Does vmstat -d give a count of actual physical writes/reads done to/from hard disk?


 
Thread Tools Search this Thread
Special Forums Hardware Filesystems, Disks and Memory Does vmstat -d give a count of actual physical writes/reads done to/from hard disk?
# 1  
Old 05-11-2009
Question Does vmstat -d give a count of actual physical writes/reads done to/from hard disk?

Hi,

I am trying to find the reliability of 'vmstat -d' for showing the actual physical writes on sectors on hard disk.

Can anyone please tell me if the numbers in the "sectors" field under "read" or "write" headers show a count of the actual write commands sent to disk from the low level driver?

More precisely, from this number, say n, can we be sure that n sectors on disk have been physically written to?Smilie
# 2  
Old 05-11-2009
Well, if you're using Linux, you can look at the sysstat code, which probably does some kind of ioctl on the raw device, and so you could look at the Linux kernel, which might end up telling you that it counts the number of blocks sent to the IO controller for writing; whether or not that means the device actually wrote those blocks, I don't think one can say.

Now it could be that the disk and its controller keep track of a statistic and it's possible to get that value, but I doubt this is what sa/sysstat relies on. Further, I've written SCSI drivers before, and if this feature exists nowadays, it's not in the standard, meaning it's on a device-by-device basis.
# 3  
Old 05-13-2009
I used to think that whatever blocks the block layer sends down to the device driver to write actually does get written, even if the 2 writes are for the same LBA. (By calling a sync between 2 writes to the same area on the disk). My doubt is that does monmitoring IO stats from iostat, vmstat, proc/diskstats or /sys/sda/stat, give a count of the num ber of blocks sent to the disk for write?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with script that reads and writes java console Minecraft

Hi I am looking for an easy way to lock game mode (0) for everyone included op on a Minecraft server. It can be a script that every time a player changes game to 1 the script changes back to 0. What the player writes is visible in the java console. I am not good at script programming and my... (0 Replies)
Discussion started by: MyMorris
0 Replies

2. UNIX for Dummies Questions & Answers

Difference between buffered disk reads and cached reads?

I was analyzing the Disk read using hdparm utility. This is what i got as a result. # hdparm -t /dev/sda /dev/sda: Timing buffered disk reads: 108 MB in 3.04 seconds = 35.51 MB/sec # hdparm -T /dev/sda /dev/sda: Timing cached reads: 3496 MB in 1.99 seconds = 1756.56 MB/sec... (1 Reply)
Discussion started by: pinga123
1 Replies

3. Linux

C++ Code to Access Linux Hard Disk Sectors (with a LoopBack Virtual Hard Disk)

Hi all, I'm kind of new to programming in Linux & c/c++. I'm currently writing a FileManager using Ubuntu Linux(10.10) for Learning Purposes. I've got started on this project by creating a loopback device to be used as my virtual hard disk. After creating the loop back hard disk and mounting it... (23 Replies)
Discussion started by: shen747
23 Replies

4. Shell Programming and Scripting

Give actual pid as argument

Hi, I run a command in the shell that run another process. I need a way to provide the command's pid to the subprocess. For instance, if I run the command foo: foo process_to_run -p foo's_pid I would like to pass to process_to_run the pid of the foo command, or something that link... (2 Replies)
Discussion started by: Dedalus
2 Replies

5. Filesystems, Disks and Memory

Life span of HDD - maximum reads/writes etc

Hi All I was wondering how the copying of vast amounts of data affected the overall lifespan of an HDD. In my example, I'm copying approx 120GB (250,000) of files, once per hour from disk to another. Is this likely to have a detrimental effect on the disk in terms of reads/writes etc? ... (2 Replies)
Discussion started by: huskie69
2 Replies

6. UNIX for Advanced & Expert Users

identify the unix process performing high disk i/o reads and writes

Guys, Is there any UNIX command that captures the 'Unix process which is performing high disk I/O reads and writes'. can you help me in this? -Swamy (6 Replies)
Discussion started by: avsswamy
6 Replies

7. Shell Programming and Scripting

identify the unix processes performing high disk i/o reads and writes

I would like to write shell/perl script which identifies the top unix processes that are performing high disk I/O's or/and writes If any one knows the solution please help me? -Swamy (0 Replies)
Discussion started by: avsswamy
0 Replies

8. HP-UX

determine the physical size of the hard disk

Hi is there a cmd in hpux 11 to determine the physical size of the hard disk. not bdf command. i have searched the other threads here but cant find an answer. thank you guys (4 Replies)
Discussion started by: hoffies
4 Replies

9. Shell Programming and Scripting

sh script that reads/writes based upon contents of a file

Hi everyone, Ive got a quick question about the feasibility and any suggestions for a shell script. I can use sh or ksh, doesnt matter. Basically, Ive got an output file from a db2 command that looks like so: SCHEMA NAME CARD LEAF ELEAF LVLS ISIZE NDEL KEYS F4 F5 ... (3 Replies)
Discussion started by: rdudejr
3 Replies

10. UNIX for Advanced & Expert Users

vmstat -P (physical memory)

vmstat -P commands gives me an output as shown at the end of this message. my first question is about the difference between "total physical memory" and "total physical memory use" "Total Physical Memory" -"Total Physical Memory Use" 524288 pages-524026 pages= 262 pages does it mean... (0 Replies)
Discussion started by: gfhgfnhhn
0 Replies
Login or Register to Ask a Question