Running a calculation against another query

I’m new to the app.

I’m having a hard time running some math that requires two queries.

I’m trying to calculate % processor usage on a per EXE basis.

I have the query that pulls Percent_Processor_Time from Process but I found it gives me numbers over 100. After further research I found I need to divide that number by the quantity of CPU’s on the system to get the right percentage of total.

The issue is the CPU count. To get that I have to query “system” for “n_cpus” then somehow use that number for running math on the first stat.

I tried created separate queries (which is pointing to an Influx db) as well as a hidden variable.

Things work okay unless I have more than one host selected at a time. When I do, it’s not picking the correct hosts CPU count for the math.

Any ideas?

This is a holding place for a removed post.