[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #6862 [arm]: arm does not show uptime
#6862: arm does not show uptime
----------------------+-----------------------------------------------------
Reporter: drforbin | Owner: atagar
Type: defect | Status: needs_information
Priority: normal | Milestone:
Component: arm | Version:
Keywords: uptime | Parent:
Points: | Actualpoints:
----------------------+-----------------------------------------------------
Comment(by atagar):
Hm, the plot thickens...
> 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
That certainly looks like what I get...
{{{
atagar@morrigan:~$ ps -p 1563 -o cputime,etime,rss,%mem
TIME ELAPSED RSS %MEM
00:04:33 52:02 165256 16.2
}}}
... and the util looks like it should be happy with it...
{{{
>>> import util.uiTools
>>> util.uiTools.parseShortTimeLabel("14:38:37")
52717
}}}
My theory is that the following is happening...
- 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.
Thanks for the catch! -Damian
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/6862#comment:5>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs