'time' for disk stats


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users 'time' for disk stats
# 1  
Old 12-09-2013
'time' for disk stats

we all know the time shell command

Is there a way to test disk i/o of a process in a similar fashion?

I am trying different methods to limit disk writes in a 24/7 daemon process and would like to
measure. I know pidstat does it but only to a running process, i want to do one shot test comparisons
with the daemon not running continuously.
# 2  
Old 12-09-2013
This sounds interesting but not terribly clear to me.

First off, this is going to have to be a OS-centric approach. What OS/Hardware do you have?

The reason I ask is dtrace runs on some platforms - iosnoop and other tools written in dtrace can do exactly what you ask - assuming I understand it. dtrace is based partially on awk syntax. (see http://dtrace.org/blogs/brendan/2012...race-training/)
http://dtrace.org in general.

My take on what you need for a given pid, correct me where I am wrong:
time spent in I/O == (sum of I/O queue waits)/(unit time).

And again, a SAN can handle larger number of direct I/O requests than a single physical disk without much degradation of perofrmance. So I dunno too much here.
# 3  
Old 12-09-2013
hi if its regarding the i/o satistsics u can try

Code:
iostat commnad

# 4  
Old 12-09-2013
I am running debian on a virtual hosting provider.
no package for dtrace.

iostat is sort of what I want but it only works on running processes, I want to do comparison runs
one shot with the same data and get a total for each.

I want to do a run and get the details of blocks written to disk.
# 5  
Old 12-09-2013
u can also may be try
Code:
sar

command it has i/o wait column may be it may be useful
# 6  
Old 12-09-2013
I got off my chair went upstairs and picked up my stevens.

The command acct does process accounting, writing data on termination of all processes. Ideal.

Hmm I tried but...
but i get zero io???


Unfortunately, on linux:

Code:
              
               comp_t    ac_io;        /* Characters transferred (unused) */
               comp_t    ac_rw;        /* Blocks read or written (unused) */

grrrrrrr! confounded linux.
# 7  
Old 12-10-2013
Can you not just call pidstat just before the end of each run?
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. Linux

Stats on subdirectories

Please help me with a shell script to get the stats on many subdirectories (sub1), (sub2) etc under a mother directory (big) /big | |_______sub1 |_______sub2 |_______sub3 --------- I want to know 1. What is the last file accessed in each subdirectory with date and by whom 2.... (2 Replies)
Discussion started by: digipak
2 Replies

2. Linux

How to Calculate Disk Queue length and Disk Busy Time

Hi, Am doing an enhancements related to monitoring a Linux disk I/O statistics. The /proc/diskstats file is used to get the each disk I/O statistics. But, It returns the raw value. How to calculate the Disk Queue Length and Disk Busy time from the raw values. Guide me. (1 Reply)
Discussion started by: maruthu
1 Replies

3. Shell Programming and Scripting

Using Stats in Php

So, I have a php program that i need to delete ALL files in a directory that are older than a certain age. <?php /* Get file stat */ $stat = stat('/apps/security/ajaba'); This is as far as I've been able to get. I know in shell programming you can easily do something like this. but I'm... (2 Replies)
Discussion started by: SkySmart
2 Replies

4. AIX

IO Stats

Aix 5.3 I am trying to view the IO stats. I do the sar 5 5 but that is the WIO and si different than the IO stats right? I am just blanking on this. I know there is a command that I used to run that brings up a whole bunch of live stats that run live such as mem and so on just can't rememeber... (4 Replies)
Discussion started by: rocker40
4 Replies

5. Solaris

CPU, memory and disk stats

I've been asked to gather CPU, memory and disk stats in the following format: Cpu_Max Cpu_Min Cpu_Avg Mem_Max Mem_Min Mem_Avg Disk_Max Disk_Min Disk_Avg Can anyone please tell me a command to gather all this info? Thanks! Todd (6 Replies)
Discussion started by: ungnown.admin
6 Replies

6. UNIX for Dummies Questions & Answers

Writing file to disk takes time

Hi All, I am working on a Solaris machine. When i use a particular software to generate some files, the log shows around 0 to 3 secs for generating each file. But the same when i see on the disk it shows double the time difference between two file generation. For example if file A takes 0 secs... (7 Replies)
Discussion started by: nileshkarania
7 Replies
Login or Register to Ask a Question