Sponsored Content
Top Forums Shell Programming and Scripting Average calculation based on number of rows Post 302428674 by bartus11 on Thursday 10th of June 2010 12:35:47 PM
Old 06-10-2010
wops, it should be "for" Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Average completion time calculation?

I've been trying all night to come up with a script that will take a file that contains job completion times like this as input: 18:30 17:45 16:39 18:01 17:50 ... and figure the Average completion time. I've tried several things, and I just can't seem to get it to figure correctly. I'm... (5 Replies)
Discussion started by: Seawall
5 Replies

2. Shell Programming and Scripting

Splitting file based on number of rows

Hi, I'm, new to shell scripting, I have a requirement where I have to split an incoming file into separate files each containing a maximum of 3 million rows. For e.g: if my incoming file say In.txt has 8 mn rows then I need to create 3 files, in which two will 3 mn rows and one will contain 2... (2 Replies)
Discussion started by: wahi80
2 Replies

3. UNIX for Dummies Questions & Answers

Calculating the Number of Rows and Average

Hi All I like to know how can we calculate the number of rows and the average of the values present in the file. I will not know what will be the rowcount, which will be dynamic in nature of the file. eg. 29 33 48 30 28 (6 Replies)
Discussion started by: pk_eee
6 Replies

4. Shell Programming and Scripting

Script to find the average of a given column and also for specified number of rows??

Hi friends I have 100 files in my directory. Each file look like this.. Temp1 Temp2 Temp3 MAS 1 2 3 MAS 4 5 6 MAS 7 8 9 Delhi 10 11 12 Delhi 13 14 15 Delhi 16 17 ... (4 Replies)
Discussion started by: ks_reddy
4 Replies

5. Shell Programming and Scripting

Script to find the average of a given column and also for specified number of rows?

Hi Friends, In continuation to my earlier post https://www.unix.com/shell-programming-scripting/99166-script-find-average-given-column-also-specified-number-rows.html I am extending my problem as follows. Input: Column1 Column2 MAS 1 MAS 4 ... (2 Replies)
Discussion started by: ks_reddy
2 Replies

6. UNIX for Dummies Questions & Answers

count number of rows based on other column values

Could anybody help with this? I have input below ..... david,39 david,39 emelie,40 clarissa,22 bob,42 bob,42 tim,32 bob,39 david,38 emelie,47 what i want to do is count how many names there are with different ages, so output would be like this .... david,2 emelie,2 clarissa,1... (3 Replies)
Discussion started by: itsme999
3 Replies

7. UNIX for Dummies Questions & Answers

Sum the rows number based on first field string value

Hi, I have a file like this one h1 4.70650E-04 4.70650E-04 4.70650E-04 h2 1.92912E-04 1.92912E-04 1.92912E-04 h3A 3.10160E-11 2.94562E-11 2.78458E-11 h4 0.00000E+00 0.00000E+00 0.00000E+00 h1 1.18164E-12 2.74150E-12 4.35187E-12 h1 7.60813E-01 7.60813E-01 7.60813E-01... (5 Replies)
Discussion started by: f_o_555
5 Replies

8. Shell Programming and Scripting

Split File based on number of rows

Hi I have a requirement, where i will receive multiple files in a folder (say: /fol1/fol2/). There will be at least 14 to 16 files. The size of the files will different, some may be 80GB or 90GB, some may be less than 5 GB (and the size of the files are very unpredictable). But the names of the... (10 Replies)
Discussion started by: kpk_ds
10 Replies

9. Shell Programming and Scripting

Average select rows

I have no idea how to even get started with this script. I need to average field 3 for each of the unique identifiers found in field 1. However, I only want to average these rows when field 2 is equal to 1506 - 2000 (note that i replaced the values field 2 for security reasons, but the real... (6 Replies)
Discussion started by: ncwxpanther
6 Replies

10. UNIX for Beginners Questions & Answers

Help with average calculation.

i have a file with 2 columns. i want to calculate the average of column 1 based on the values of column 2. here's how the file looks like. i want to calculate the sums of numbers corresponding to 1 and then calculate the average. same for numbers corresponding to zero. any help with a code would... (1 Reply)
Discussion started by: onerokeyz
1 Replies
NFSIOSTAT(1)                                                    Linux User's Manual                                                   NFSIOSTAT(1)

NAME
nfsiostat - Report input/output statistics for network filesystems (NFS). SYNOPSIS
nfsiostat [ -h ] [ -k | -m ] [ -t ] [ -V ] [ interval [ count ] ] DESCRIPTION
The nfsiostat command displays statistics about read and write operations on NFS filesystems. The interval parameter specifies the amount of time in seconds between each report. The first report contains statistics for the time since system startup (boot). Each subsequent report contains statistics collected during the interval since the previous report. A report con- sists of an NFS header row followed by a line of statistics for each network filesystem that is mounted. The count parameter can be speci- fied in conjunction with the interval parameter. If the count parameter is specified, the value of count determines the number of reports generated at interval seconds apart. If the interval parameter is specified without the count parameter, the nfsiostat command generates reports continuously. REPORT
The Network Filesystem (NFS) report provides statistics for each mounted network filesystem. Transfer rates are shown in 1K blocks by default, unless the environment variable POSIXLY_CORRECT is set, in which case 512-byte blocks are used. The report shows the following fields: Filesystem: This columns shows the hostname of the NFS server followed by a colon and by the directory name where the network filesystem is mounted. rBlk_nor/s (rkB_nor/s, rMB_nor) Indicate the number of blocks (kilobytes, megabytes) read by applications via the read(2) system call interface. A block has a size of 512 bytes. wBlk_nor/s (wkB_nor/s, wMB_nor/s) Indicate the number of blocks (kilobytes, megabytes) written by applications via the write(2) system call interface. rBlk_dir/s (rkB_dir/s, rMB_dir/s) Indicate the number of blocks (kilobytes, megabytes) read from files opened with the O_DIRECT flag. wBlk_dir/s (wkB_dir/s, wMB_dir/s) Indicate the number of blocks (kilobytes, megabytes) written to files opened with the O_DIRECT flag. rBlk_svr/s (rkB_svr/s, rMB_svr/s) Indicate the number of blocks (kilobytes, megabytes) read from the server by the NFS client via an NFS READ request. wBlk_svr/s (wkB_svr/s, wMB_svr/s) Indicate the number of blocks (kilobytes, megabytes) written to the server by the NFS client via an NFS WRITE request. ops/s Indicate the number of operations that were issued to the filesystem per second. rops/s Indicate the number of 'read' operations that were issued to the filesystem per second. wops/s Indicate the number of 'write' operations that were issued to the filesystem per second. OPTIONS
-h Make the NFS report easier to read by a human. -k Display statistics in kilobytes per second. -m Display statistics in megabytes per second. -t Print the time for each report displayed. The timestamp format may depend on the value of the S_TIME_FORMAT environment variable (see below). -V Print version number then exit. ENVIRONMENT
The nfsiostat command takes into account the following environment variables: S_TIME_FORMAT If this variable exists and its value is ISO then the current locale will be ignored when printing the date in the report header. The nfsiostat command will use the ISO 8601 format (YYYY-MM-DD) instead. The timestamp displayed with option -t will also be com- pliant with ISO 8601 format. POSIXLY_CORRECT When this variable is set, transfer rates are shown in 512-byte blocks instead of the default 1K blocks. BUG
/proc filesystem must be mounted for nfsiostat to work. FILE
/proc/self/mountstats contains statistics for network filesystems. AUTHORS
Written by Ivana Varekova (varekova <at> redhat.com) Maintained by Sebastien Godard (sysstat <at> orange.fr) SEE ALSO
sar(1), pidstat(1), mpstat(1), vmstat(8), iostat(1), cifsiostat(1) http://pagesperso-orange.fr/sebastien.godard/ Linux JANUARY 2011 NFSIOSTAT(1)
All times are GMT -4. The time now is 11:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy