12-24-2015
Your specification is a little bit too vague for me to understand what you're trying to do. And the sample script you have shown us doesn't seem to be doing what you're describing.
Why don't you give us a much smaller sample log file (maybe about 20 lines) and you show us exactly what output you are hoping to produce from that input? And then, please explain how the sample output you will have shown us is derived from the sample log file input you will have shown us?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All ,
I am trying to build a script using awk that checks columns of the înput file and displays message if the column length exceeds 35 char.
i have tried the below code but it does not work properly (2 Replies)
Discussion started by: amit1_x
2 Replies
2. Shell Programming and Scripting
Hi guys,
I have tried to find a solution for this problem but couln't. If anyone of you have an Idea do help me.
INPUT_FILE
with three columns shown to be separated by - sign
A5BNK723NVI - 1 - 294
A7QZM0VIT - 251 - 537
A7NU3411V - 245 - 527
I want an output file in which First column... (2 Replies)
Discussion started by: smriti_shridhar
2 Replies
3. Shell Programming and Scripting
For example, if I have the file whose content are:
>HWI-EAS382_30FC7AAXX:7:1:927:1368
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
>HWI-EAS382_30FC7AAXX:7:1:924:1373
ACGAACTTTAAAGCACCTCTTGGCTCGTATGCCGTC
I want my output calculate the total length of nucleotide. So my output should look like this:... (1 Reply)
Discussion started by: patrick chia
1 Replies
4. Shell Programming and Scripting
Hi Friends,
I have .txt file which has 13000 records.
Each record is 278 character long.
I am using below code to extract the string and it takes almost 10 minutes.
Any suggestion please.
cat filename.txt|while read line
do
f1=`echo $line|awk '{print substr($1,1,9)}'`
f2=`echo... (6 Replies)
Discussion started by: ppat7046
6 Replies
5. Shell Programming and Scripting
All,
I can't seem to find exactly what I'm looking for, and haven't had any luck patching things together.
I need to look through a file, and if the record length is not 874, then add 'E' in position 778.
Your help is greatly appreciated. (4 Replies)
Discussion started by: CutNPaste
4 Replies
6. Shell Programming and Scripting
Hi ,
I need to extract data from below mentioned data, having no delimiter and havin no fixed column length.
For example:
Member nbr Ref no date
10000 1000 10202012
200000 2000 11202012
Output:
to update DB with memeber nbr on basis of ref no.
... (6 Replies)
Discussion started by: ns64110
6 Replies
7. Shell Programming and Scripting
How to find total number of special character in a column?
I am using awk -f "," '$col_number "*$" {print $col_number}' file.csv|wc -l but its not giving correct output. It's giving output as 1 even though i give no special character?
Please use code tags next time for your code and... (4 Replies)
Discussion started by: AjitKumar
4 Replies
8. Shell Programming and Scripting
Hi,
I need help with one problem, I came across recently.
I have one input file which I need to delimit based on character length.
$ cat Input.txt
12345sda231453
asd760kjol62569
sdasw4g76gdf57
And, There is one comma separated file which mentions "start of the field" and "length... (6 Replies)
Discussion started by: Prathmesh
6 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I've got a file like this:
22 22:35645163:T:<CN0>:0 0 35645163 T <CN0>
22 rs140738445:20902439:TTTTTTTG:T 0 20902439 T TTTTTTTG
22 rs149602065:40537763:TTTTTTG:T 0 40537763 T TTTTTTG
22 rs71670155:50538408:TTTTTTG:T 0 50538408 T TTTTTTG... (3 Replies)
Discussion started by: zajtat
3 Replies
10. Shell Programming and Scripting
Good day, I am a newbie here and thanks for accepting me
I have a task to modify input data where my input data looks like
123|34567|CHINE
1|23|INDIA
34512|21|USA
104|901|INDIASee that my input has two columns with different character length but max length is 5 and minimum length is 0 which... (1 Reply)
Discussion started by: fastlearner
1 Replies
LEARN ABOUT CENTOS
pmdasample
PMDASAMPLE(1) General Commands Manual PMDASAMPLE(1)
NAME
pmdasample - sample performance metrics domain agent (PMDA)
SYNOPSIS
$PCP_PMDAS_DIR/pmdasample [-d domain] [-i port] [-l logfile] [-p] [-u socket] [-U username]
DESCRIPTION
pmdasample is a sample Performance Metrics Domain Agent (PMDA) which exports a variety of synthetic performance metrics.
This PMDA was developed as part of the quality assurance testing for the PCP product, but has other uses, most notably in the development
of new PCP clients.
The metrics exported by the sample PMDA cover the full range of data types, data semantics, value cardinality, instance domain stability
and error conditions found in real PMDAs.
A brief description of the pmdasample command line options follows:
-d It is absolutely crucial that the performance metrics domain number specified here is unique and consistent. That is, domain should
be different for every PMDA on the one host, and the same domain number should be used for the same PMDA on all hosts.
-i Expect PMCD to connect to pmdasample on the specified TCP/IP port. port may be a port number or port name.
-l Location of the log file. By default, a log file named sample.log is written in the current directory of pmcd(1) when pmdasample is
started, i.e. $PCP_LOG_DIR/pmcd. If the log file cannot be created or is not writable, output is written to the standard error
instead.
-p Expect PMCD to create a pipe and the connection to pmdasample is via standard input and standard output. This is the default connec-
tion mode.
-u Expect PMCD to connect to pmdasample on the Unix domain socket named socket.
-U User account under which to run the agent. The default is the unprivileged "pcp" account in current versions of PCP, but in older
versions the superuser account ("root") was used by default.
At most one of the options -i, -p and -u may be specified.
INSTALLATION
If you want access to the names, help text and values for the sample performance metrics, do the following as root:
# cd $PCP_PMDAS_DIR/sample
# ./Install
Note that the installation script also installs the DSO version of the sample PMDA, so there are in fact two PMDAs installed, and two sets
of performance metrics, namely sample.* and sampledso.*.
If you want to undo the installation (and remove both PMDAs), do the following as root:
# cd $PCP_PMDAS_DIR/sample
# ./Remove
pmdasample is launched by pmcd(1) and should never be executed directly. The Install and Remove scripts notify pmcd(1) when the agent is
installed or removed.
FILES
$PCP_PMCDCONF_PATH
command line options used to launch pmdasample
$PCP_PMDAS_DIR/sample/help
default help text file for the sample metrics
$PCP_PMDAS_DIR/sample/Install
installation script for the pmdasample agent
$PCP_PMDAS_DIR/sample/Remove
undo installation script for the pmdasample agent
$PCP_LOG_DIR/pmcd/sample.log
default log file for error messages and other information from pmdasample
PCP ENVIRONMENT
Environment variables with the prefix PCP_ are used to parameterize the file and directory names used by PCP. On each installation, the
file /etc/pcp.conf contains the local values for these variables. The $PCP_CONF variable may be used to specify an alternative configura-
tion file, as described in pcp.conf(5).
SEE ALSO
PCPIntro(1), pmcd(1), pmdasimple(1), pmdatrivial(1), pmdatxmon(1), pcp.conf(5) and pcp.env(5).
Performance Co-Pilot PCP PMDASAMPLE(1)