CPU Usage Raw

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
jromariz
Posts: 264
Joined: Wed Apr 03, 2002 6:00 pm
Location: Brasil

CPU Usage Raw

Post by jromariz »

Hi Alex,

I´m getting a strange result from RMA script test "CPU Usage RAW" per process. If I log into the remote computer where RMA is running and do a "top" command, I see the process I´m monitoring using more then 1% of cpu almost all the time. The problem is that RMA is reporting 0% of cpu usage on the same process all the time. Any idea about what could be wrong?

Thanks for helping.


Jromariz.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

May be "top" utility that you have installed displays result using different format.
What version of the utility do you use?
What it shows when you type "top -b -n 1" command?

Regards
Alex
jromariz
Posts: 264
Joined: Wed Apr 03, 2002 6:00 pm
Location: Brasil

Post by jromariz »

Alex,

I have another test using memory usage per process on the same machine that´s working fine. What happens if the cpu usage is below 1 (0.1, for example)? Will I get the real value or it will be rounded to 0?

Regards,


Jromariz.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

"gawk" should understand real numbers but... lets make experiment. Could you type echo "0.1" | gawk BEGIN { test=0 } test<$1 { test=$1 } END {printf("%d",test)}

Regards
Alex
jromariz
Posts: 264
Joined: Wed Apr 03, 2002 6:00 pm
Location: Brasil

Post by jromariz »

Alex,

I´m getting this error:

-bash: syntax error near unexpected token `('


Regards,

Jromariz.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Sorry, I missed quotation marks.
And I see why you do not see real numbers - printf("%d",test).
We did that in purpose, but if 0.1% of CPU load is importand for you, replace printf("%d",test) with printf("%2.2f",test) in the script

Regards
Alex
jromariz
Posts: 264
Joined: Wed Apr 03, 2002 6:00 pm
Location: Brasil

Post by jromariz »

Ok Alex,

I´ll try. Thanks for helping.

Regards,

Jromariz.
Post Reply