Sponsored Content
Full Discussion: Measurement file parsing
Top Forums Shell Programming and Scripting Measurement file parsing Post 302629263 by Corona688 on Tuesday 24th of April 2012 12:33:16 PM
Old 04-24-2012
You can put more than one statement in one awk. In fact, you can do the entire thing in awk.

Code:
$ cat zaf.awk

BEGIN { OFS="," }

/measure1/      { MEASURE1=$NF }
/zdfg/          { ZDFG=$NF     }
/cpu_use/       { CPUUSE=$NF   }

END { print MEASURE1, ZDFG, CPUUSE }

$ awk -f zaf.awk datafile

value,value,value

$

This User Gave Thanks to Corona688 For This Post:
 

8 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Performance measurement of Code

I hope I am posting the query at right place.. I have the project running as 32 bit application on Solaris 8. I want to port this to 64Bit application. Before I start this process, I would like to compare the performance of a sample code running as 32Bit/64 Bit executables on a 64 bit... (1 Reply)
Discussion started by: amit_sapre
1 Replies

2. Programming

time measurement

I have a bottleneck in one of my applications...I have a loop that goes through a few thousand interations, but does quite a few things (digs info out of a database, sends the data to another application, etc...). I want to put in some debugging to determine what function calls are taking the most... (8 Replies)
Discussion started by: jalburger
8 Replies

3. UNIX for Dummies Questions & Answers

Commands performance measurement

Hi, Actually i wanted to check out the process time for the execution of commands on unix, i looking for the script which can include all commands which are to be executed on the system and i need to get the time for executing each command, can somebody help me Thanks & Regards Murali (1 Reply)
Discussion started by: hsmuralidhara
1 Replies

4. Shell Programming and Scripting

Parsing of file for Report Generation (String parsing and splitting)

Hey guys, I have this file generated by me... i want to create some HTML output from it. The problem is that i am really confused about how do I go about reading the file. The file is in the following format: TID1 Name1 ATime=xx AResult=yyy AExpected=yyy BTime=xx BResult=yyy... (8 Replies)
Discussion started by: umar.shaikh
8 Replies

5. Shell Programming and Scripting

convert file storage size from one unit of measurement to another

The source number is always in megabytes and I need a script to covert into either MB,GB or TB displayed in a specific format. Source number examples: 5345376635 34255 5453645846353 The result has to be maximum 2 numbers after the comma 1.13 TB 134.17 TB 413.46 GB 678.45 MB I... (3 Replies)
Discussion started by: TehOne
3 Replies

6. IP Networking

SNMP OID for Network Utilization measurement

Hi everyone, I've just copied a snmpget script from somewhere. This script is basically used to collect basic router information. Ex: syscontact,syslocation,etc. And I want to extend the script to be able to collect some network information and utilization of some machines ex: bandwith usage,... (0 Replies)
Discussion started by: franzramadhan
0 Replies

7. IP Networking

OID for Bandwith and Throughput Measurement

Hey Guys, Does anybody know, which OID's of Net-SNMP is used to collect throughput and bandwith usage of machine?? I got these OID's ..iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOutOctets ..1.3.6.1.2.1.2.2.1.16 ... (1 Reply)
Discussion started by: franzramadhan
1 Replies

8. UNIX for Advanced & Expert Users

Redhat - IO performance measurement

Hi Currently we have SAN setup in our Redhat Environment. I have used iostat tool and ran it couple of times, i think there is IO bottle neck. Can anyone suggest any other tools or help me how to perform multiple Reads/Writes to test its performance (1 Reply)
Discussion started by: rakeshkumar
1 Replies
qscan(1)							     qscan 0.7								  qscan(1)

NAME
qscan - console tool for quality measurement of optical media SYNOPSIS
qscan [-l] [-h] qscan -d DEVICE [-S] [-i] [-m] qscan -d DEVICE [-p] [-r] [-w] [-v] qscan -d DEVICE [-f] [-s] [-t] [-v] qscan -d DEVICE -t wt [-s #] [-W] DESCRIPTION
qscan is the linux console tool for error correction measuring with optical devices. The related plugin allows to use vendor specific com- mands on your optical device. Currently supported vendors are Asus, Benq, Liteon, NEC, Pioneer and Plextor. For detailed information look at http://qpxtool.sourceforge.net/supported.html DEVICE
can be an IDE, SCSI, SATA, USB or FireWire connected optical drive. Not all SATA controller support all Plextor features. Linux: /dev/hdX: IDE device /dev/scdX: Linux 2.4: SATA, SCSI, USB device, or IDE device via ide-scsi emulation /dev/srX: Linux 2.6: IDE device via new ATA layer, SCSI or USB device OpenBSD/NetBSD: /dev/rcdX FreeBSD: /dev/cd: SCSI device /dev/acd: ATA device MacOS X: /dev/disk: win32: C:,D:,E:, ... X:,Y:,Z: OPTIONS
-l, --scanbus scan busses for all available optical devices -h, --help show help -S, --speeds detect available read and write speeds for selected -d DEVICE and the relating media -i, --info show device info of selected -d DEVICE -m, --media show media info of selected -d DEVICE -p, --plugins list all available plugins -f, --force-plugin PLUGIN [ ASUS | BENQ | BENQ_DVDROM |GENERIC |LITEON |NEC |PIONEER |PLEXTOR ] force usage of the selected plugin to use the vendor specific commands for the slected device. Default behaviour auto detection modus. [ASUS] use Asus vendor specific commands [BENQ] use Benq optical writer vendor specific commands [BENQ_DVDROM] use Benq optical reader vendor specific commands [GENERIC] use generic mmc commands [LITEON] use Liteon vendor specific commands [NEC] use NEC vendor specific commands [PIONEER] use Pioneer vendor specific commands [PLEXTOR] use Plextor vendor specific commands -r #, --rspeed # set read performance speed to selected value. Use -S option before, if you are unsure which speeds are supported -s #, --speed # set measurement speed to selected value. Use -S option before, if you don't know what speeds are supported by your device. Don't use this with -r or -w option. -t, --test [rt|wt|errc|ft|jb|ta] select the q-check you want to be proceeded. Not all tests are supported by all devices. For detailed information about the terms read the project page: http://qpxtool.sourceforge.net/glossar.html [rt] read transfer rate measurement [wt] write transfer rate on blank media [errc] errror correction - Cx-scan / PIE, PIF, POE, POF [ft] focus and tracking error measurement [jb] jitter and beta measurement [ta] time analyzer measurement -w #, --wspeed # set write speed to selected value. Use -S option before, if you don't know what write speeds are supported by your device. -v, --verbose gives verbose output and debug information -W, --write perform real write instead simulation for write transfer rate EXAMPLES
qscan -l scan all buses for availabale optical devices qscan -d /dev/sr2 -S Show available speed steps of device /dev/sr2. qscan -d /dev/sr2 -t errc -s 5 Proceed an error correction scan on device /dev/sr2 with 5x speed. qscan -d /dev/sr0 -t wt -s 12 Proceed a write performance test in simulation mode on device /dev/sr0 (dummy mode) with 12x speed please report man page improvements to T.Maguin@web.de Gennady ShultZ Kozlov 10. April, 2009 qscan(1)
All times are GMT -4. The time now is 01:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy