Sponsored Content
Top Forums Shell Programming and Scripting formatting of sar/sadf utility output Post 302317112 by friendyboy on Monday 18th of May 2009 05:23:47 AM
Old 05-18-2009
formatting of sar/sadf utility output

Hi,
I have output from sadf as below

# hostname;interval;timestamp;DEV;tps;rd_sec/s;wr_sec/s;avgrq-sz;avgqu-sz;await;svctm;%util
bigredhat4.na.uis.unisys.com;2;2009-05-23 00:36:40;dev8-0;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;dev8-16;2.27;0.00;90.91;40.00;0.00;1.75;1.75;0.40
bigredhat4.na.uis.unisys.com;2;2009-05-23 00:36:42;dev8-0;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;dev8-16;1.72;0.00;36.78;21.33;0.00;1.33;1.33;0.23
bigredhat4.na.uis.unisys.com;2;2009-05-23 00:36:44;dev8-0;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;dev8-16;2.31;0.00;50.87;22.00;0.00;1.25;1.25;0.29
bigredhat4.na.uis.unisys.com;2;2009-05-23 00:36:46;dev8-0;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;dev8-16;2.26;0.00;54.24;24.00;0.00;1.50;1.50;0.34
bigredhat4.na.uis.unisys.com;2;2009-05-23 00:36:48;dev8-0;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;dev8-16;1.67;0.00;26.67;16.00;0.00;1.67;1.67;0.28

but to get it in a format similar to perfmon output I need out put as below


# hostname;interval;timestamp;tps(dev8-0 dev8-16);rd_sec/s(dev8-0 dev8-16);wr_sec/s(dev8-0 dev8-16);avgrq-sz(dev8-0 dev8-16);avgqu-sz(dev8-0 dev8-16);await(dev8-0 dev8-16);svctm(dev8-0 dev8-16);%util(dev8-0 dev8-16)
bigredhat4.na.uis.unisys.com;2;2009-05-23 00:36:40;0.00 2.27;0.00 0.00;0.00 90.91;0.00 40.00;0.00 0.00;0.00 1.75;0.00 1.75;0.00 0.40
bigredhat4.na.uis.unisys.com;2;2009-05-23 00:36:42;0.00 1.72;0.00 0.00;0.00 36.78;0.00 21.33;0.00 0.00;0.00 1.33;0.00 1.33;0.00 0.23
bigredhat4.na.uis.unisys.com;2;2009-05-23 00:36:44;0.00 2.31;0.00 0.00;0.00 50.87;0.00 22.00;0.00 0.00;0.00 1.25;0.00 1.25;0.00 0.29
bigredhat4.na.uis.unisys.com;2;2009-05-23 00:36:46;0.00 2.26;0.00 0.00;0.00 54.24;0.00 24.00;0.00 0.00;0.00 1.50;0.00 1.50;0.00 0.34
bigredhat4.na.uis.unisys.com;2;2009-05-23 00:36:48;0.00 1.67;0.00 0.00;0.00 26.67;0.00 16.00;0.00 0.00;0.00 1.67;0.00 1.67;0.00 0.28


please tel me how can I achieve this?

Regards
Friendyboy
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sar -q output for one processor

Hello, We like to know if there is a way to report the sar -q per processor on AIX 4.3 . Please help RGDS,Elie. (1 Reply)
Discussion started by: eyounes
1 Replies

2. UNIX for Advanced & Expert Users

sar utility

can somebody provide me the Material on SAR utility for performance tuning (2 Replies)
Discussion started by: srinivasp
2 Replies

3. Shell Programming and Scripting

sar today's output

Hi All, i tried sar command the output appears to be for several days I would like to just see today's SAR output: Please advice me. $sar Linux 2.6.9-67.ELsmp (lrtp50) 02/28/09 00:00:01 CPU %user %nice %system %iowait %idle 00:05:02 all 3.10... (4 Replies)
Discussion started by: raghur77
4 Replies

4. Shell Programming and Scripting

Formatting Sar Output script

Hi, We have 2 scripts below for reporting sar output which are pretty same. In first script i want to add to the program whatever is given in the comments. In second script I want to use while true to run this program every hour and everything that is in comment. Finally I want to club... (0 Replies)
Discussion started by: noorm
0 Replies

5. Solaris

extraction of sar output

Hi, Anyone knows how to extract sar command output to excel or Is there any free grapical tools to extract this sar log file. thanks, regards (2 Replies)
Discussion started by: vijill
2 Replies

6. Solaris

Strange sar output

I was reviewing yesterday's sar file and came across this strange output! What in the world? Any reason why there's output like that? SunOS unixbox 5.10 Generic_144488-07 sun4v sparc SUNW,T5240 Solaris 00:00:58 device %busy avque r+w/s blks/s avwait avserv 11:20:01 ... (4 Replies)
Discussion started by: dangral
4 Replies

7. UNIX for Advanced & Expert Users

sar -d output... does not make sense

Can someone explain the correlation between how sar names the disk drives and how the rest of the OS names the disk drives? sar lists my disk drives as sd0, sd1, sd2, etc..... while format lists my disk drives as c1t0d0, c1t1d0, c1t2d0,etc... And also why sar shows 8 disks but format... (2 Replies)
Discussion started by: s ladd
2 Replies

8. Solaris

sar output

One of my servers giving all zero sar output. Could anyone explain this behaviour. Thanks CHaandana Sample: 10:43:37 %usr %sys %wio %idle 16:15:01 2 1 0 97 16:20:02 2 1 0 97 16:25:02 2 1 0 97 16:30:01 ... (3 Replies)
Discussion started by: chaandana
3 Replies

9. Solaris

Odd output from sar

We're experiencing some intermittent freezes on one of our systems and I'm trying to figure out what is happening. We're running Solaris 10 zones mounting shares from netapp through nfs. On the zone that freezes we have sar running and are getting this output: SunOS prodserver 5.10... (3 Replies)
Discussion started by: Jyda
3 Replies

10. Red Hat

Sar output

I am facing situation where sar -u command is showing 0 for all cps, so does it mean all the cpus are fully utilized, os is oracle Linux 6.8 01:34:13 PM all 0 0 0 0 0.00 0 (2 Replies)
Discussion started by: manoj.solaris
2 Replies
LQR_CARVER_GET_IMAGE_TYPE				     LqR library API reference					 LQR_CARVER_GET_IMAGE_TYPE

NAME
lqr_carver_get_image_type - get the image type of a LqrCarver object SYNOPSIS
#include <lqr.h> LqrImageType lqr_carver_get_image_type(LqrCarver* carver); DESCRIPTION
The function lqr_carver_get_image_type returns the image type (i.e. colour model) of the image contained in the LqrCarver object pointed to by carver. SEE ALSO
LqrImageType(3), lqr_carver_new(3), lqr_carver_set_image_type(3), lqr_carver_get_width(3), lqr_carver_get_height(3), lqr_carver_get_ref_width(3), lqr_carver_get_ref_height(3), lqr_carver_get_channels(3), lqr_carver_get_col_depth(3), lqr_carver_get_enl_step(3), lqr_carver_get_orientation(3) COPYRIGHT
Copyright (C) 2007-2009 Carlo Baldassi LqR library 0.4.1 API (3:1:3) 10 Maj 2009 LQR_CARVER_GET_IMAGE_TYPE
All times are GMT -4. The time now is 06:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy