I saw other ticket which put this down to not running under tor account. I am running under tor account and have also tried under root. I think the ps command is not being parsed properly.
thanxs
Trac: Username: drforbin
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
I assume you mean ps -p TOR_PID -o cputime,etime,rss,%mem
not ...
Oops, you're right. Copied the formatted string and forgot the escape.
attachment log...
Here's the interesting bits...
9/16/2012 19:05:18 [DEBUG] Unable to query process resource usage from proc (stat file had an unexpected format: /proc/1804/stat)9/16/2012 19:05:19 [INFO] Failed three attempts to get process resource usage from proc, falling back to ps (stat file had an unexpected format: /proc/1804/stat)9/16/2012 19:05:19 [DEBUG] system call: ps -p 1804 -o cputime,etime,rss,%mem (runtime: 0.02)
So it's indeed using ps rather than the proc contents, and isn't reporting any issues.
here is return
TIME ELAPSED RSS %MEM
00:01:22 14:38:37 55208 5.7
When the header panel first starts up it fetches static attributes (things that it only needs once). This includes tor's start time.
We see that a proc file exists, so try to use it to get the start time rather than ps. This fails (as mentioned in the log) and we cache the failed 'None' result in the header panel.
To test this theory please make a text file with...
queries.useProc false
... then run arm with 'arm --config /path/to/that/file'. If the uptime now appears then this is indeed the bug.
I assume setting that option to false disables proc use right?
Yup. The log entries I mentioned earlier tell us that it's trying to query your proc contents but fails, and after three tries it gives up. This config option tells arm to skip trying to query proc in the first place.
adds overhead?
This config option doesn't add any overhead (it just makes you skip some queries that are doomed to fail anyway). However, our inability to use the proc contents does add a little overhead. Reading proc is around 10x faster and less resource intensive than needing to shell out. That said, making periodic ps queries really isn't heavy at all.
Cheers! -Damian
Trac: Status: needs_information to closed Resolution: N/Ato fixed