Sponsored Content
Full Discussion: 'time' for disk stats
Top Forums UNIX for Advanced & Expert Users 'time' for disk stats Post 302878867 by bigearsbilly on Monday 9th of December 2013 09:47:15 AM
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.
 

6 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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
acct.h(3HEAD)							      Headers							     acct.h(3HEAD)

NAME
acct.h, acct - per-process accounting file format SYNOPSIS
#include <sys/types.h> #include <sys/acct.h> DESCRIPTION
Files produced as a result of calling acct(2) have records in the form defined by <sys/acct.h>, whose contents are: typedef ushort_t comp_t; /* pseudo "floating point" representation */ /* 3 bit base-8 exponent in the high */ /* order bits, and a 13-bit fraction */ /* in the low order bits. */ struct acct { char ac_flag; /* Accounting flag */ char ac_stat; /* Exit status */ uid_t ac_uid; /* Accounting user ID */ gid_t ac_gid; /* Accounting group ID */ dev_t ac_tty; /* control tty */ time_t ac_btime; /* Beginning time */ comp_t ac_utime; /* accounting user time in clock ticks */ comp_t ac_stime; /* accounting system time in clock ticks */ comp_t ac_etime; /* accounting total elapsed time in clock ticks */ comp_t ac_mem; /* memory usage in clicks (pages) */ comp_t ac_io; /* chars transferred by read/write */ comp_t ac_rw; /* number of block reads/writes */ char ac_comm[8]; /* command name */ }; /* * Accounting Flags */ #define AFORK 01 /* has executed fork, but no exec */ #define ASU 02 /* used super-user privileges */ #define ACCTF 0300 /* record type */ #define AEXPND 040 /* Expanded Record Type - default */ In ac_flag, the AFORK flag is turned on by each fork and turned off by an exec. The ac_comm field is inherited from the parent process and is reset by any exec. Each time the system charges the process with a clock tick, it also adds to ac_mem the current process size, computed as follows: (data size) + (text size) / (number of in-core processes using text) The value of ac_mem/(ac_stime+ac_utime) can be viewed as an approximation to the mean process size, as modified by text sharing. The structure tacct, (which resides with the source files of the accounting commands), represents a summary of accounting statistics for the user id ta_uid. This structure is used by the accounting commands to report statistics based on user id. /* * total accounting (for acct period), also for day */ struct tacct { uid_t ta_uid; /* user id */ char ta_name[8]; /* login name */ float ta_cpu[2]; /* cum. cpu time in minutes, */ /* p/np (prime/non-prime time) */ float ta_kcore[2]; /* cum. kcore-minutes, p/np */ float ta_con[2]; /* cum. connect time in minutes, p/np */ float ta_du; /* cum. disk usage (blocks)*/ long ta_pc; /* count of processes */ unsigned short ta_sc; /* count of login sessions */ unsigned short ta_dc; /* count of disk samples */ unsigned short ta_fee; /* fee for special services */ }; The ta_cpu, ta_kcore, and ta_con members contain usage information pertaining to prime time and non-prime time hours. The first element in each array represents the time the resource was used during prime time hours. The second element in each array represents the time the resource was used during non-prime time hours. Prime time and non-prime time hours may be set in the holidays file (see holidays(4)). The ta_kcore member is a cumulative measure of the amount of memory used over the accounting period by processes owned by the user with uid ta_uid. The amount shown represents kilobyte segments of memory used, per minute. The ta_con member represents the amount of time the user was logged in to the system. FILES
/etc/acct/holidays prime/non-prime time table SEE ALSO
acctcom(1), acct(1M), acctcon(1M), acctmerg(1M), acctprc(1M), acctsh(1M), prtacct(1M), runacct(1M), shutacct(1M), acct(2), exec(2), fork(2) NOTES
The ac_mem value for a short-lived command gives little information about the actual size of the command, because ac_mem may be incremented while a different command (for example, the shell) is being executed by the process. SunOS 5.11 19 May 1994 acct.h(3HEAD)
All times are GMT -4. The time now is 07:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy