console polling loop and inotify

William Cohen wcohen at redhat.com
Thu Mar 29 10:39:37 EDT 2007


Marco Pesenti Gritti wrote:
> On Thu, 2007-03-29 at 09:43 -0400, William Cohen wrote:
>> 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.
> 
> Yeah that something which needs to be fixed. A trac would be useful.
> 
> (Eduardo if you have time fixing this would be really good)
> 
> Marco
> 

I have put in trac #1189,
console polling loop and inotify.

-Will



More information about the Devel mailing list