2010-09-03 19 views
28

Adlandırılmış işlemlerin istatistiklerini izlemek için Munin için bir eklenti oluşturuyorum. Bilgi kaynaklarından biri /proc/[pid]/io olacaktır. Ancak farkın rchar/wchar ve read_bytes/written_bytes arasında ne olduğunu bulmakta zorlanıyorum.Sayaçları anlama/proc/[pid]/io

Farklı değerler sağladıkları için aynı değiller. Neyi temsil ediyorlar? proc manpage (ve böylece çerez kesici kullanıcı uzay gelişimine ilişkin değil bir şey üzerinde en Elyordamsayfalarının/belgelerdir) acı arkasında iken

+0

Umut bazı (ben özellikle) daha az olanlar eski dillerde, azınlık projelerine aşina olmayan, değişiklikleri umursamıyorum;) Ben bununla yaşayabilirim –

+1

ama: İşte alakalı parçalarıdır o kadar küçük değil, gerçekten. Bunu iyi konuşlandırılmış olarak düşünüyorum. – Kvisle

cevap

56

, bu malzeme neyse Documentation/filesystems/proc.txt altında Linux kernel source tamamen belgelenmiştir.

rchar 
----- 

I/O counter: chars read 
The number of bytes which this task has caused to be read from storage. This 
is simply the sum of bytes which this process passed to read() and pread(). 
It includes things like tty IO and it is unaffected by whether or not actual 
physical disk IO was required (the read might have been satisfied from 
pagecache) 


wchar 
----- 

I/O counter: chars written 
The number of bytes which this task has caused, or shall cause to be written 
to disk. Similar caveats apply here as with rchar. 


read_bytes 
---------- 

I/O counter: bytes read 
Attempt to count the number of bytes which this process really did cause to 
be fetched from the storage layer. Done at the submit_bio() level, so it is 
accurate for block-backed filesystems. <please add status regarding NFS and 
CIFS at a later time> 


write_bytes 
----------- 

I/O counter: bytes written 
Attempt to count the number of bytes which this process caused to be sent to 
the storage layer. This is done at page-dirtying time. 
+2

+1 Bu ipucu hayatımı kurtardı – lupz

+0

Mükemmel .. Gerçekten yararlı. – Vineeth

İlgili konular