In post #1, the labels in your sample input files were "train statistics" and "test statistics". In your latest code you have labels with underscores instead of spaces. You'll have to be sure your stats files and your labels match.
In post #3, you included a header line in your output; I don't see anything in your latest code that prints that header. And, unless each of your stats files contains all of the sets of statistics and includes them in the same order, what you have shown us will end up printing data for different sets of statistics under each other in the output with no indication of which set they came from. Do each of your stats files contain statistics from all of the possible sets of statistics and are each of those sets of statistics present in the same order in each stats file?
In your latest code you have:
which sets both your input file and your output file to be the same input parameter. I'm about 99% sure that isn't what you want.
The cat in your code isn't helping and seems to be working against you. I think you're going to want to end up with something more like:
Do you want your output fields to be tab separated, or do you want your output fields to be in aligned columns? Note that since your field headers vary in width from 6 characters (e.g., "test_n" to more than 9 characters (e.g. " train_MdAE" and your statistics data all fit in less than 8 characters, the two choices are mutually exclusive. (I.e., you can't have both.)
This User Gave Thanks to Don Cragun For This Post:
Hi
I need to pass an array to Awk script from Shell. Can you please tell how to do it? How to pass this array add_ct_arr to an awk script or access it in awk?
i=1
while ;
do
add_ct_arr=$(echo ${adda_count} | awk -v i=$i -F" " '{print $i;}')
echo ${add_ct_arr}
... (1 Reply)
Hi All :),
I am very new to unix. I am requiring ur help in developing shell script for below problem.
I have to replace the second field of file with values of array sequentially where first field is ValidateKeepVar
<File>
UT-ExtractField 1 | &LogEntry &Keep(DatatoValidate)... (3 Replies)
OS=HP-UX ksh
The following works, except I want to include the <start> and <end> in the output.
awk -F '<start>' 'BEGIN{RS="<end>"; OFS="\n"; ORS=""} {print $2} somefile.log'
The following work in bash but not in ksh
sed -n '/^<start>/,/^<end>/{/LABEL$/!p}' somefile.log (4 Replies)
Hi, all
suppose I have following myfile (delimited by tab)
aa bb
cc dd
ee ffand I have following awk command:
awk 'BEGIN{FS="\t"}{AwkArrayVar_1=$1;AwkArrayVar_2=$2};END{for(i=0; i<NR; i++) print i, AwkArrayVar_1, AwkArrayVar_2,}' myfileMy question is: how can I assign the awk array... (7 Replies)
hi,
i want to pass an array parameters to a sftp script so that i can transfer each file in the array to the remote server by connecting only once to the sftp remote server.
i thought of using a variable that contains list of file names separated by a space and pass the variable to the sftp... (3 Replies)
There are two parts to this. In the first part I need to read a list of files from a directory and split it into 4 arrays. I have done that with the following code,
# collect list of file names
STATS_INPUT_FILENAMES=($(ls './'$SET'/'$FOLD'/'*'in.txt'))
# get number of files... (8 Replies)
I need to create a shell script to delete multiple items (Strings) at a time from a file.
I need to iterate through a list of strings.
My plan is to create an array and then iterate through the array.
My code is not working
#!/bin/bash -x
declare -a array=(one, two, three, four)... (5 Replies)
Hello,
I have some tab delimited text data,
file: final_temp1
aname val
NAME;r'(1,) 3.28584
r'(2,)<tab>
NAME;r'(3,) 6.13003
NAME;r'(4,) 4.18037
r'(5,)<tab>
You can see that the data is incomplete in some cases. There is a trailing tab after the first column for each incomplete row. I... (2 Replies)
Hello,
I have a src code file where I need to uncomment many lines.
The lines I need to uncomment look like,
C CALL l_r(DESNAME,DESOUT, 'Gmax', ESH(10), NO_APP, JJ)
The comment is the "C" in the first column. This needs to be deleted so that there are 6 spaces preceding "CALL".... (7 Replies)
Discussion started by: LMHmedchem
7 Replies
LEARN ABOUT SUSE
nfsstat
nfsstat(8) System Manager's Manual nfsstat(8)NAME
nfsstat - list NFS statistics
SYNOPSIS
nfsstat [OPTION]...
DESCRIPTION
The nfsstat displays statistics kept about NFS client and server activity.
OPTIONS -s, --server
Print only server-side statistics. The default is to print both server and client statistics.
-c, --client
Print only client-side statistics.
-n, --nfs
Print only NFS statistics. The default is to print both NFS and RPC information.
-2 Print only NFS v2 statistics. The default is to only print information about the versions of NFS that have non-zero counts.
-3 Print only NFS v3 statistics.
-4 Print only NFS v4 statistics.
-m, --mounts
Print information about each of the mounted NFS file systems.
If this option is used, all other options are ignored.
-r, --rpc
Print only RPC statistics.
-o facility
Display statistics for the specified facility, which must be one of:
nfs NFS protocol information, split up by RPC call.
rpc General RPC information.
net Network layer statistics, such as the number of received packets, number of TCP connections, etc.
fh Usage information on the server's file handle cache, including the total number of lookups, and the number of hits and
misses.
rc Usage information on the server's request reply cache, including the total number of lookups, and the number of hits and
misses.
all Display all of the above facilities.
-v, --verbose
This is equivalent to -o all.
-l, --list
Print information in list form.
-S, --since file
Instead of printing current statistics, nfsstat imports statistics from file and displays the difference between those and the cur-
rent statistics. Valid input files may be in the form of /proc/net/rpc/nfs (raw client stats), /proc/net/rpc/nfsd (raw server
stats), or saved output from nfsstat itself (client and/or server stats). Any statistics missing from a saved nfsstat output file
are treated as zeroes.
-Z[interval], --sleep=[interval]
Instead of printing current statistics and immediately exiting, nfsstat takes a snapshot of the current statistics and pauses until
it receives SIGINT (typically from Ctrl-C), at which point it takes another snapshot and displays the difference between the two.
If interval is specified, nfsstat will print the number of NFS calls made since the previous report. Stats will be printed repeat-
edly every interval seconds.
EXAMPLES
nfsstat -o all -234
Show all information about all versions of NFS.
nfsstat --verbose -234
Same as above.
nfsstat -o all
Show all information about active versions of NFS.
nfsstat --nfs --server -3
Show statistics for NFS version 3 server.
nfsstat -m
Show information about mounted NFS filesystems.
DISPLAY
The Flags output from the -m option is the same as the flags give to the mount command.
FILES
/proc/net/rpc/nfsd
procfs-based interface to kernel NFS server statistics.
/proc/net/rpc/nfs
procfs-based interface to kernel NFS client statistics.
/proc/mounts
procfs-based interface to the mounted filesystems.
SEE ALSO rpc.nfsd(8). nfs(5).
BUGS
The default output has been changed. To get the old default output you must run nfsstat --auto -2.
The function of the -v and -a options have changed. The -a option is now reserved for future use. The -v does what the -a option used to
do, and the new -[234] options replace the -v option.
The Display section should be more complete.
Further bugs can be found or reported at http://nfs.sf.net/.
AUTHOR
Olaf Kirch, <okir@suse.de>
7 Aug 2007 nfsstat(8)