[Trac #1189] console polling loop and inotify

Zarro Boogs per Child bugtracker at laptop.org
Thu Mar 29 10:36:20 EDT 2007


#1189: console polling loop and inotify
--------------------+-------------------------------------------------------
 Reporter:  wcohen  |       Owner:  dcbw     
     Type:  defect  |      Status:  new      
 Priority:  normal  |   Milestone:  Untriaged
Component:  sugar   |    Keywords:           
--------------------+-------------------------------------------------------
 I was running a simple script iotime.stp on the 314 build. The script
 monitors the reads and write performed by the systemt. When the process
 does the close it prints a summary: a time stamp in microseconds, pid,
 process name, type of information (number of accesses or amount of time),
 the file name. For accesses this is a "count" of the number of io
 operations follow by number of bytes read and writen. The time ones record
 the accumulated number of microseconds of wall clock time spent in read
 and write systemcalls for file by process.

 When the machine was idle I saw the following entries come up again and
 again when the alt-0 console was open:


 70943178 1916 (python) access /home/olpc/.sugar/default/logs count: 0
 read: 0 write: 0
 70943410 1916 (python) access /home/olpc/.sugar/default/logs/shell.log
 count: 2 read: 8474 write: 0
 70943410 1916 (python) iotime /home/olpc/.sugar/default/logs/shell.log
 time: 24
 70943681 1916 (python) access
 /home/olpc/.sugar/default/logs/presenceservice.log count: 2 read: 9052
 write: 0
 70943681 1916 (python) iotime
 /home/olpc/.sugar/default/logs/presenceservice.log time: 25
 70943952 1916 (python) access /home/olpc/.sugar/default/logs/clipboard.log
 count: 2 read: 8227 write: 0
 70943952 1916 (python) iotime /home/olpc/.sugar/default/logs/clipboard.log
 time: 24


 Why poll? Doesn't python have access to inotify? It seems like something
 like that would be useful in a number of places to avoid having processes
 wake up, check that nothing has changed, and then go back to sleep.

 -Will

-- 
Ticket URL: <http://dev.laptop.org/ticket/1189>
One Laptop Per Child <http://laptop.org/>



More information about the Bugs mailing list