LINUXHEALTH CPU Load wrong

gnulptgnulpt
Hi,



I am currently trying the evaluation version.



I have installed the LINUXHEALTH agent as described in the Wiki using the server.c file from the installed version.



Compiled the file and run it as instructed.



I am able to setup a rule to monitor LINUXHEALTH.

The monitor shows up but unfortunately the CPU load is stuck at 50% even with the server idling.



Disk capacity seems to be fine.



Do I need to modify something in the server.c ?

I am running RedHat Linux.



Thanks



Klaus König

Comments

  • AdministratorAdministrator
    When you telnet to the Linux server on port 5555, what data is returned?



    Which version of the software are you running?
  • I am running 8.0 RC1, downloaded from your website. The server.c is the one included in the Add-on directory of the installed version.



    I do not know how to add the log file to this post, so I just copied the CPU part in here...



    --- CPU states ---

    Cpu(s): 0.1%us, 0.1%sy, 0.0%ni, 99.4%id, 0.4%wa, 0.0%hi, 0.0%si, 0.0%st

    Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st





    BTW my system has Dual Quad Core Xeon processors (2 Cpus).



    Thanks for your help!



    Rgds



    Klaus
  • AdministratorAdministrator
    When you click on test settings in the web interface of the software, then what is returned?



    It seems that CPU info is returned correctly. Based upon above CPU usage is 0.6%
  • Here is the result of the test...



    ---

    Test-Einstellungen

    ----------------------------------------------------------------------

    Der Check wurde ausgeführt.





    Status: OK

    Zurückgegebener Wert: PING 3ms - 50.4 % CPU usage - 93 % Free memory - 57 % free on sda2 - 96 % free on sda4 - 93 % free on sda1 - 100 % free on tmpfs -

    ----



    So CPU usage is somehow wrong...



    I got a bit adventerout and changed the port from 5555 to 5554 and voila, CPU usage is more sensible now....



    Guess that was it.



    Thanks for your patience!



    Klaus
  • sorry.... not quite solved...



    the CPU reading is still inconsistant...



    sometimes it seems right, sometimes it is wrong...



    Any ideas?



    Klaus
  • AdministratorAdministrator
    When you click on test settings do you always get that value of around 50%



    It seems to get values from the agent. The question now is, is it misreading the values returned from the agent, or is the agent always returning that. Invoking the agent shouldn't result in a 50% CPU usage.



    Assuming you are running release 8, download following test build of the monitoring_thread2.exe which will create when running a file called linuxhealthdebug.log

    http://files.serverscheck.net/fixes/gnulpt.zip



    Once downloaded, stop the monitoring service. Rename the current monitoring_thread2.exe to something else. Put the downloaded one in the main serverscheck folder and restart the services.



    Let it run for a few minutes until some data is in there and then reply with the output produced.


  • Thanks for the quick response!



    Yes, I always get a value around 50%.



    Did the change as requested and ran the linuxhealth at port 5555.



    Here is the result from the log file...



    Looks like it is using the idle % and it might not handle the second cpu correctly...



    Maybe it would also be cool to have two CPU meters when 2 CPUs are present....



    --------------------------------

    # Thu Sep 10 09:47:04 2009 Reply:

    # Thu Sep 10 09:47:04 2009 Reply: --- Process info ---

    # Thu Sep 10 09:47:04 2009 Reply: 1 ? 00:00:01 init

    # Thu Sep 10 09:47:04 2009 Reply:

    # Thu Sep 10 09:47:04 2009 Reply: ;--- Disk info ---

    # Thu Sep 10 09:47:04 2009 Reply: Filesystem 1K-blocks Used Available Use% Mounted on

    # Thu Sep 10 09:47:04 2009 Reply: /dev/sda2 30470176 12385300 16512116 43% /

    disk found: -> /dev/sda2 30470176 12385300 16512116 43% /

    # Thu Sep 10 09:47:04 2009 Reply: /dev/sda4 196559076 7289332 179123896 4% /home

    disk found: -> /dev/sda4 196559076 7289332 179123896 4% /home

    # Thu Sep 10 09:47:04 2009 Reply: /dev/sda1 988088 64348 872736 7% /boot

    disk found: -> /dev/sda1 988088 64348 872736 7% /boot

    # Thu Sep 10 09:47:04 2009 Reply: tmpfs 4149284 0 4149284 0% /dev/shm

    disk found: -> tmpfs 4149284 0 4149284 0% /dev/shm

    # Thu Sep 10 09:47:04 2009 Reply:

    # Thu Sep 10 09:47:04 2009 Reply: --- Memory info ---

    # Thu Sep 10 09:47:04 2009 Reply: total used free shared buffers cached

    # Thu Sep 10 09:47:04 2009 Reply: Mem: 8298572 539108 7759464 0 26212 331956

    # Thu Sep 10 09:47:04 2009 Reply: -/+ buffers/cache: 180940 8117632

    # Thu Sep 10 09:47:04 2009 Reply: Swap: 8803612 0 8803612

    # Thu Sep 10 09:47:04 2009 Reply:

    # Thu Sep 10 09:47:04 2009 Reply: --- CPU states ---

    # Thu Sep 10 09:47:04 2009 Reply: Cpu(s): 0.1%us, 0.1%sy, 0.0%ni, 99.4%id, 0.4%wa, 0.0%hi, 0.0%si, 0.0%st

    cpu found: 1 99.4 - temp1 .99.4.

    # Thu Sep 10 09:47:04 2009 Reply: Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st

    cpu found: 2 99.4 - temp1 .ni,100.0.

    # Thu Sep 10 09:47:04 2009 Reply:

    cpufound: 2

    total cpu: 99.4 on 2 cpu's

    # Thu Sep 10 09:50:08 2009 Reply:

    # Thu Sep 10 09:50:08 2009 Reply: --- Process info ---

    # Thu Sep 10 09:50:08 2009 Reply: 1 ? 00:00:01 init

    # Thu Sep 10 09:50:08 2009 Reply:

    # Thu Sep 10 09:50:08 2009 Reply: ;--- Disk info ---

    # Thu Sep 10 09:50:08 2009 Reply: Filesystem 1K-blocks Used Available Use% Mounted on

    # Thu Sep 10 09:50:08 2009 Reply: /dev/sda2 30470176 12385300 16512116 43% /

    disk found: -> /dev/sda2 30470176 12385300 16512116 43% /

    # Thu Sep 10 09:50:08 2009 Reply: /dev/sda4 196559076 7289332 179123896 4% /home

    disk found: -> /dev/sda4 196559076 7289332 179123896 4% /home

    # Thu Sep 10 09:50:08 2009 Reply: /dev/sda1 988088 64348 872736 7% /boot

    disk found: -> /dev/sda1 988088 64348 872736 7% /boot

    # Thu Sep 10 09:50:08 2009 Reply: tmpfs 4149284 0 4149284 0% /dev/shm

    disk found: -> tmpfs 4149284 0 4149284 0% /dev/shm

    # Thu Sep 10 09:50:08 2009 Reply:

    # Thu Sep 10 09:50:08 2009 Reply: --- Memory info ---

    # Thu Sep 10 09:50:08 2009 Reply: total used free shared buffers cached

    # Thu Sep 10 09:50:08 2009 Reply: Mem: 8298572 539244 7759328 0 26236 331956

    # Thu Sep 10 09:50:08 2009 Reply: -/+ buffers/cache: 181052 8117520

    # Thu Sep 10 09:50:08 2009 Reply: Swap: 8803612 0 8803612

    # Thu Sep 10 09:50:08 2009 Reply:

    # Thu Sep 10 09:50:08 2009 Reply: --- CPU states ---

    # Thu Sep 10 09:50:08 2009 Reply: Cpu(s): 0.1%us, 0.1%sy, 0.0%ni, 99.5%id, 0.4%wa, 0.0%hi, 0.0%si, 0.0%st

    cpu found: 1 99.5 - temp1 .99.5.

    # Thu Sep 10 09:50:08 2009 Reply: Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st

    cpu found: 2 99.5 - temp1 .ni,100.0.

    # Thu Sep 10 09:50:08 2009 Reply:

    cpufound: 2

    total cpu: 99.5 on 2 cpu's

    # Thu Sep 10 09:53:12 2009 Reply:

    # Thu Sep 10 09:53:12 2009 Reply: --- Process info ---

    # Thu Sep 10 09:53:12 2009 Reply: 1 ? 00:00:01 init

    # Thu Sep 10 09:53:12 2009 Reply:

    # Thu Sep 10 09:53:12 2009 Reply: ;--- Disk info ---

    # Thu Sep 10 09:53:12 2009 Reply: Filesystem 1K-blocks Used Available Use% Mounted on

    # Thu Sep 10 09:53:12 2009 Reply: /dev/sda2 30470176 12385300 16512116 43% /

    disk found: -> /dev/sda2 30470176 12385300 16512116 43% /

    # Thu Sep 10 09:53:12 2009 Reply: /dev/sda4 196559076 7289332 179123896 4% /home

    disk found: -> /dev/sda4 196559076 7289332 179123896 4% /home

    # Thu Sep 10 09:53:12 2009 Reply: /dev/sda1 988088 64348 872736 7% /boot

    disk found: -> /dev/sda1 988088 64348 872736 7% /boot

    # Thu Sep 10 09:53:12 2009 Reply: tmpfs 4149284 0 4149284 0% /dev/shm

    disk found: -> tmpfs 4149284 0 4149284 0% /dev/shm

    # Thu Sep 10 09:53:12 2009 Reply:

    # Thu Sep 10 09:53:12 2009 Reply: --- Memory info ---

    # Thu Sep 10 09:53:12 2009 Reply: total used free shared buffers cached

    # Thu Sep 10 09:53:12 2009 Reply: Mem: 8298572 539620 7758952 0 26284 331956

    # Thu Sep 10 09:53:12 2009 Reply: -/+ buffers/cache: 181380 8117192

    # Thu Sep 10 09:53:12 2009 Reply: Swap: 8803612 0 8803612

    # Thu Sep 10 09:53:12 2009 Reply:

    # Thu Sep 10 09:53:12 2009 Reply: --- CPU states ---

    # Thu Sep 10 09:53:12 2009 Reply: Cpu(s): 0.0%us, 0.1%sy, 0.0%ni, 99.5%id, 0.3%wa, 0.0%hi, 0.0%si, 0.0%st

    cpu found: 1 99.5 - temp1 .99.5.

    # Thu Sep 10 09:53:12 2009 Reply: Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st

    cpu found: 2 99.5 - temp1 .ni,100.0.

    # Thu Sep 10 09:53:12 2009 Reply:

    cpufound: 2

    total cpu: 99.5 on 2 cpu's

    # Thu Sep 10 09:56:16 2009 Reply:

    # Thu Sep 10 09:56:16 2009 Reply: --- Process info ---

    # Thu Sep 10 09:56:16 2009 Reply: 1 ? 00:00:01 init

    # Thu Sep 10 09:56:16 2009 Reply:

    # Thu Sep 10 09:56:16 2009 Reply: ;--- Disk info ---

    # Thu Sep 10 09:56:16 2009 Reply: Filesystem 1K-blocks Used Available Use% Mounted on

    # Thu Sep 10 09:56:16 2009 Reply: /dev/sda2 30470176 12385300 16512116 43% /

    disk found: -> /dev/sda2 30470176 12385300 16512116 43% /

    # Thu Sep 10 09:56:16 2009 Reply: /dev/sda4 196559076 7289332 179123896 4% /home

    disk found: -> /dev/sda4 196559076 7289332 179123896 4% /home

    # Thu Sep 10 09:56:16 2009 Reply: /dev/sda1 988088 64348 872736 7% /boot

    disk found: -> /dev/sda1 988088 64348 872736 7% /boot

    # Thu Sep 10 09:56:16 2009 Reply: tmpfs 4149284 0 4149284 0% /dev/shm

    disk found: -> tmpfs 4149284 0 4149284 0% /dev/shm

    # Thu Sep 10 09:56:16 2009 Reply:

    # Thu Sep 10 09:56:16 2009 Reply: --- Memory info ---

    # Thu Sep 10 09:56:16 2009 Reply: total used free shared buffers cached

    # Thu Sep 10 09:56:16 2009 Reply: Mem: 8298572 539368 7759204 0 26316 331956

    # Thu Sep 10 09:56:16 2009 Reply: -/+ buffers/cache: 181096 8117476

    # Thu Sep 10 09:56:16 2009 Reply: Swap: 8803612 0 8803612

    # Thu Sep 10 09:56:16 2009 Reply:

    # Thu Sep 10 09:56:16 2009 Reply: --- CPU states ---

    # Thu Sep 10 09:56:16 2009 Reply: Cpu(s): 0.0%us, 0.1%sy, 0.0%ni, 99.6%id, 0.3%wa, 0.0%hi, 0.0%si, 0.0%st

    cpu found: 1 99.6 - temp1 .99.6.

    # Thu Sep 10 09:56:16 2009 Reply: Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st

    cpu found: 2 99.6 - temp1 .ni,100.0.

    # Thu Sep 10 09:56:16 2009 Reply:

    cpufound: 2

    total cpu: 99.6 on 2 cpu's
  • Did some more testin by loading the CPUs with some processes.



    Here are two readings with differen CPU loads:



    -----------------------------



    CPU Meter reading 44%



    log entry:



    # Thu Sep 10 10:39:13 2009 Reply:

    # Thu Sep 10 10:39:13 2009 Reply: --- Process info ---

    # Thu Sep 10 10:39:13 2009 Reply: 1 ? 00:00:01 init

    # Thu Sep 10 10:39:13 2009 Reply:

    # Thu Sep 10 10:39:13 2009 Reply: ;--- Disk info ---

    # Thu Sep 10 10:39:13 2009 Reply: Filesystem 1K-blocks Used Available Use% Mounted on

    # Thu Sep 10 10:39:13 2009 Reply: /dev/sda2 30470176 12386648 16510768 43% /

    disk found: -> /dev/sda2 30470176 12386648 16510768 43% /

    # Thu Sep 10 10:39:13 2009 Reply: /dev/sda4 196559076 7289332 179123896 4% /home

    disk found: -> /dev/sda4 196559076 7289332 179123896 4% /home

    # Thu Sep 10 10:39:13 2009 Reply: /dev/sda1 988088 64348 872736 7% /boot

    disk found: -> /dev/sda1 988088 64348 872736 7% /boot

    # Thu Sep 10 10:39:13 2009 Reply: tmpfs 4149284 0 4149284 0% /dev/shm

    disk found: -> tmpfs 4149284 0 4149284 0% /dev/shm

    # Thu Sep 10 10:39:13 2009 Reply:

    # Thu Sep 10 10:39:13 2009 Reply: --- Memory info ---

    # Thu Sep 10 10:39:13 2009 Reply: total used free shared buffers cached

    # Thu Sep 10 10:39:13 2009 Reply: Mem: 8298572 1156772 7141800 0 98296 412040

    # Thu Sep 10 10:39:13 2009 Reply: -/+ buffers/cache: 646436 7652136

    # Thu Sep 10 10:39:13 2009 Reply: Swap: 8803612 0 8803612

    # Thu Sep 10 10:39:13 2009 Reply:

    # Thu Sep 10 10:39:13 2009 Reply: --- CPU states ---

    # Thu Sep 10 10:39:13 2009 Reply: Cpu(s): 6.2%us, 31.0%sy, 0.0%ni, 62.7%id, 0.1%wa, 0.0%hi, 0.0%si, 0.0%st

    cpu found: 1 62.7 - temp1 .62.7.

    # Thu Sep 10 10:39:13 2009 Reply: Cpu(s): 10.4%us, 40.9%sy, 0.0%ni, 48.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st

    cpu found: 2 111.4 - temp1 .48.7.

    # Thu Sep 10 10:39:13 2009 Reply:

    cpufound: 2

    total cpu: 111.4 on 2 cpu's



    -----------------------------



    CPU Meter reading 31%



    log entry:



    # Thu Sep 10 10:48:46 2009 Reply:

    # Thu Sep 10 10:48:46 2009 Reply: --- Process info ---

    # Thu Sep 10 10:48:46 2009 Reply: 1 ? 00:00:01 init

    # Thu Sep 10 10:48:46 2009 Reply:

    # Thu Sep 10 10:48:46 2009 Reply: ;--- Disk info ---

    # Thu Sep 10 10:48:46 2009 Reply: Filesystem 1K-blocks Used Available Use% Mounted on

    # Thu Sep 10 10:48:46 2009 Reply: /dev/sda2 30470176 12386644 16510772 43% /

    disk found: -> /dev/sda2 30470176 12386644 16510772 43% /

    # Thu Sep 10 10:48:46 2009 Reply: /dev/sda4 196559076 7289332 179123896 4% /home

    disk found: -> /dev/sda4 196559076 7289332 179123896 4% /home

    # Thu Sep 10 10:48:46 2009 Reply: /dev/sda1 988088 64348 872736 7% /boot

    disk found: -> /dev/sda1 988088 64348 872736 7% /boot

    # Thu Sep 10 10:48:46 2009 Reply: tmpfs 4149284 0 4149284 0% /dev/shm

    disk found: -> tmpfs 4149284 0 4149284 0% /dev/shm

    # Thu Sep 10 10:48:46 2009 Reply:

    # Thu Sep 10 10:48:46 2009 Reply: --- Memory info ---

    # Thu Sep 10 10:48:46 2009 Reply: total used free shared buffers cached

    # Thu Sep 10 10:48:46 2009 Reply: Mem: 8298572 1128316 7170256 0 98504 411708

    # Thu Sep 10 10:48:46 2009 Reply: -/+ buffers/cache: 618104 7680468

    # Thu Sep 10 10:48:46 2009 Reply: Swap: 8803612 0 8803612

    # Thu Sep 10 10:48:46 2009 Reply:

    # Thu Sep 10 10:48:46 2009 Reply: --- CPU states ---

    # Thu Sep 10 10:48:46 2009 Reply: Cpu(s): 6.4%us, 30.7%sy, 0.0%ni, 62.8%id, 0.1%wa, 0.0%hi, 0.0%si, 0.0%st

    cpu found: 1 62.8 - temp1 .62.8.

    # Thu Sep 10 10:48:46 2009 Reply: Cpu(s): 5.6%us, 21.0%sy, 0.0%ni, 73.4%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st

    cpu found: 2 136.2 - temp1 .73.4.

    # Thu Sep 10 10:48:46 2009 Reply:

    cpufound: 2

    total cpu: 136.2 on 2 cpu's


  • AdministratorAdministrator
    Thank you for this very useful feedback. Based on what I see, it seems that the issue is the 100% CPU idle on the second CPU.



    I have passed it on to development and I'll update you later today with feedback I have.


  • AdministratorAdministrator
    Please repeat the download. An updated version has been posted with now 2 files in there.



    http://files.serverscheck.net/fixes/gnulpt.zip
  • I have installed the two files and the result looks better...



    Here are two log entries:



    -----------------------------



    CPU meter reading 25%



    # Thu Sep 10 15:13:20 2009 Reply: --- CPU states ---

    # Thu Sep 10 15:13:20 2009 Reply: Cpu(s): 2.3%us, 11.9%sy, 0.0%ni, 85.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st

    cpu found: 1 85.7 - temp1 . 85.7.

    # Thu Sep 10 15:13:20 2009 Reply: Cpu(s): 7.5%us, 29.9%sy, 0.0%ni, 62.5%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st

    cpu found: 2 148.2 - temp1 . 62.5.

    # Thu Sep 10 15:13:20 2009 Reply:

    cpufound: 2

    total cpu: 148.2 on 2 cpu's



    -----------------------------



    CPU meter reading 13%



    # Thu Sep 10 15:16:24 2009 Reply: --- CPU states ---

    # Thu Sep 10 15:16:24 2009 Reply: Cpu(s): 2.3%us, 11.9%sy, 0.0%ni, 85.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st

    cpu found: 1 85.7 - temp1 . 85.7.

    # Thu Sep 10 15:16:24 2009 Reply: Cpu(s): 5.5%us, 7.5%sy, 0.0%ni, 87.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st

    cpu found: 2 172.7 - temp1 . 87.0.

    # Thu Sep 10 15:16:24 2009 Reply:

    cpufound: 2

    total cpu: 172.7 on 2 cpu's



    -----------------------------



    Guess that seems to be right?!?!



    The log file is still outputted by the process, can I cure this by using the original monitoring_thread2 or do you have to send me a new one without the logging?



    Still I think it would be useful to have a little cpu dial for each cpu of the machine. Then you could see if one cpu is running 100% while the other is idling. Just one dial would tell you you are running at 50% load not reflecting the situation....



    Oh, one last little bug...

    on the main GUI, in the top left section where it tells you since when the thing is running, there is a line that tells you when it was last updated. On the time readout, it is swallowing the leading 0 of the minutes.

    So rather telling you it was run at e.g. 15:09 it reads 15:9

    At 15:10 everything is fine again > readout 15:10



    Rgds.



    Klaus
This discussion has been closed.