neek
unread,Mar 11, 2011, 3:35:52 AM3/11/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to JavaSysMon
Hi there,
I've downloaded and installed the latest, and though 'top' shows me
100% cpu usage for the java pid, the javasysmon library seems to
return a consistently low value. However, top does not report 100%
overall, so javasysmon may be doing The Right Thing and something else
is going wrong.
Please excuse this paste, I don't know how better to do this with
google groups:
top - 08:28:14 up 123 days, 4:40, 2 users, load average: 1.43,
1.70, 1.81
Tasks: 79 total, 2 running, 77 sleeping, 0 stopped, 0 zombie
Cpu(s): 3.1%us, 9.8%sy, 0.0%ni, 87.1%id, 0.0%wa, 0.0%hi,
0.0%si, 0.0%st
Mem: 786432k total, 488532k used, 297900k free, 0k
buffers
Swap: 0k total, 0k used, 0k free, 0k
cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+
COMMAND
8018 premier 20 0 324m 206m 10m S 98.2 26.9 204:25.27
java
5673 premier 15 0 2284 1048 816 R 1.0 0.1 0:00.02
top
1 root 15 0 2152 664 572 S 0.0 0.1 0:11.34
init
Note the low "user" percentage, the machine is 87.1% idle.. yet the
java process has 98.2% CPU reported on its line.
The bug in my code is my problem, but I'm trying to use javasysmon to
let me know _when_ the cpu sticks at 100%, which happens erratically
during the day and needs restarting. It's a jetty based web server,
and I start a new Thread-derived class which owns its own instance of
JavaSysMon and reports to a custom log file like this:
[usage 0.14302027] [55823304 bytes free of 101384192]
SystemMonitor: 11-03-11 08:19:24 - pid 8018 [physical total: 768Mb
free: 299Mb] [usage 0.15071768] [43454504 bytes free of 101384192]
SystemMonitor: 11-03-11 08:19:29 - pid 8018 [physical total: 768Mb
free: 299Mb] [usage 0.15027028] [46255576 bytes free of 101384192]
SystemMonitor: 11-03-11 08:19:34 - pid 8018 [physical total: 768Mb
free: 298Mb] [usage 0.16804487] [58059736 bytes free of 101384192]
the 'usage' reported is always low, 0.1 - 0.18 or so.
The pid reported by 'top' and javasysmon are consistent (8018 in the
above examples). Is there something obvious I might be doing wrong?
I don't understand how my java app can be at 100% yet top report a low
actual usage.
Thanks
Nick