Visit Our UNIX and Linux User Community


Unmatched ssd create huge unuseful iostat output


 
Thread Tools Search this Thread
Operating Systems Solaris Unmatched ssd create huge unuseful iostat output
# 1  
Old 03-19-2015
Unmatched ssd create huge unuseful iostat output

My scheduled collection of statistics is giving very large output because of an high number of ssd device not associated to any disk
The iostat -x command is collecting statistics from them and the output is very large.

I.g.
if a run
Code:
iostat -x|tail +3|awk '{print $1}'>f0.txt.$$
iostat -nx|tail +3|awk '{print "/dev/dsk/"$11}'>f1.txt.$$
paste -d= f[01].txt.$$ > assoc.txt

then in assoc.txt I find not only rows like
Code:
ssd5=/dev/dsk/c8t6005076309FFC3E40000000000000006d0

but also many rows as
Code:
ssd3220=/dev/dsk/ssd3220
ssd3221=/dev/dsk/ssd3221

an the output is plenty of statistics about device that not really exists

Code:
iostat -x ssd3220
                 extended device statistics
device     r/s    w/s   kr/s   kw/s wait actv  svc_t  %w  %b
ssd3220    0.0    0.0    0.0    0.0  0.0  0.0    0.0   0   0

How can I delete such ssd ?

Last edited by Franklin52; 03-19-2015 at 09:21 AM.. Reason: Please use code tags
# 2  
Old 03-21-2015
use the -z option. This example assumes those dummy devices do no I/O and you do not want the first "run" of iostat which shows activity averaged over time since boot:

Code:
iostat -zx 2 5 | awk '/svc_t/ {cnt++} cnt>1' > file2keep

Otherwise create a file that lists the ones you do not want:

Code:
iostat -x | grep -vf excludefile

Example excludefile:
Code:
ssd19
ssd21
ssd44
ssd77

This User Gave Thanks to jim mcnamara For This Post:
# 3  
Old 03-21-2015
You might want to clean the disk device map with:
Code:
devfsadm -C -c disk -v

These 2 Users Gave Thanks to jlliagre For This Post:
# 4  
Old 03-23-2015
It's useful, but I cannot change collecting scripts

---------- Post updated at 01:46 PM ---------- Previous update was at 01:44 PM ----------

I've already changed device map with devfsadm, but dummy devices are still there
# 5  
Old 03-23-2015
So you are saying that you have giant input files, and cannot do anyhting change how they are created. That would have been nice to know earlier.

1. generate a list of ssd devices that are useless to you. Call the file exclude.txt
2. use nawk on the two files, exclude.txt and giant.txt
Code:
nawk 'FILENAME=="exclude.txt" {arr[$0]=1;next}
         FILENAME=="giant.txt" { if($1 in arr) 
                                              {next}
                                              else
                                              {print $0}
          }   '  exclude.txt giant.txt   > reportfile

Note: the order of file names on the command is required: exclude.txt comes first.
# 6  
Old 03-23-2015
I'm afraid I can't apply this workaround
giant ouput files are not in ascii format (it's the output of sadc command)
what I'm looking for is a way to exclude such ghost devices from any system check (without restarting the system)

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need help to parse iostat command output

Hi, I got the code below is one of the threads from this forum. lineCount=$(iostat | wc -l) numDevices=$(expr $lineCount - 7); iostat $interval -x -t | awk -v awkCpuFile=$cpuFile -v awkDeviceFile=$deviceFile -v awkNumDevices=$numDevices ' BEGIN { print... (2 Replies)
Discussion started by: gopivallabha
2 Replies

2. Shell Programming and Scripting

How to compare 2 files and create a result file with unmatched lines from first file.?

HI, I have 2 text files. file1 and file2. file1.txt (There are no duplicates in this file) 1234 3232 4343 3435 6564 6767 1213 file2.txt 1234,wq,wewe,qwqw 1234,as,dfdf,dfdf 4343,asas,sdds,dsds 6767,asas,fdfd,fdffd I need to search each number in file1.txt in file2.txt's 1st... (6 Replies)
Discussion started by: Little
6 Replies

3. Solaris

Asvc_t values in iostat output

Noticed that asvc_t values in iostat command outputs are mostly more than 100 in our previous iostat analysis. Also found the following detail from an alternate site IO Bottleneck - Disk performance issue - UnixArena ---- 1. asvc_t average service time of active transactions, in... (2 Replies)
Discussion started by: saraperu
2 Replies

4. Shell Programming and Scripting

Output only first 400 bytes of a huge text file

How do I output only the first 400 bytes of a huge text file to a new file. It has to be unmodified so no added invisible characters. Many thanks..... (3 Replies)
Discussion started by: garethsays
3 Replies

5. Filesystems, Disks and Memory

iostat output vs TPC output (array layer)

Hi Guys, I've been having some arguments with my colleagues about one thing. Always my thought was that as as far as disk performance is concern by looking at the output of the iostat command (AIX) you would be able to identify if you have a hot disk and then by moving some files out that disk... (3 Replies)
Discussion started by: arizah
3 Replies

6. Shell Programming and Scripting

finding greatest value in a column using awk from iostat output in linux

Friends, Need some help. On linux i have to run iostat command and in each iteration have to print the greatest value in each column. e.g iostat -dt -kx 2 2 | awk ' !/sd/ &&!/%util/ && !/Time/ && !/Linux/ {print $12}' 4.38 0.00 0.00 0.00 WHhat i would like to... (15 Replies)
Discussion started by: achak01
15 Replies

7. Shell Programming and Scripting

finding greatest value in a column using awk from iostat output in linux

Friends, . On linux i have to run iostat command and in each iteration have to print the greatest value in each column. e.g iostat -dt -kx 2 2 | awk ' !/sd/ &&!/%util/ && !/Time/ && !/Linux/ {print $12}' 4.38 0.00 0.00 0.00 What i would like to print is only the... (3 Replies)
Discussion started by: achak01
3 Replies

8. Shell Programming and Scripting

Formatting output from iostat

So I use Cacti for monitoring IO statistics on my servers, now originally I couldnt monitor Multipath deviced servers as they have alot of /dev/sdxx and /dev/emcpowerxx, I have devised a method of trimming them down to just the actual devices but the issue is the output looks like so. # iostat... (0 Replies)
Discussion started by: RiSk
0 Replies

9. UNIX for Advanced & Expert Users

iostat output what is that mean

Hi all, i have run iostat -em, and get below result. Can i know what is this output meaning, and how to fix that problem. iostat -em ---- errors --- device s/w h/w trn tot sd7 0 1 0 1 sd8 1 1 0 2 sd9 0 1 0 1 sd10 0 ... (2 Replies)
Discussion started by: foongkt5220
2 Replies

10. Solaris

iostat -e / -E output explanation

Hi all, hope you are having a nice day, its nice and warm today in Canberra Australia. iostat -e / -E reports soft and hard errors. Any idea what these are exactly? All I hear are I/O's failing and needing to retry, but no cause as to why they fail. My SUN guru tells me its our EMC SAN... (1 Reply)
Discussion started by: scottman
1 Replies

Featured Tech Videos