First I need to make the name of file for example
${Source Tag}.Stage[Please help me to make the name of the file above]
and then I need to fetch the few things like from the below format
Admins
Pls. assist me to update a new field having 40 rows to a file.
Test1.output
LV Space %free Space_used_04_15
dev 500 7 67%
dev1 800 7 75%
dev2 800 7 75%
dev3 900 7 ... (2 Replies)
Hi guys,
Please help me out in this problem. I have two files
FILE1
abc-23 : 4529675
cde-42 : 9824532
dge-91 : 1245367
gre-45 : 9824532
fgr-76 : 4529675
FILE2
4529675 : Gal Glu house-2-be
9824532 : cat mouse
1245367 : sirf surf-2-beta
where FILE2 is a static file with fixed... (5 Replies)
I wanna add a ":" at the end of each line, and i did something like this:
cat Totals | while read ID TOTAL
do
echo "${ID}:${TOTAL}:" >>Totals2
done
File: Totals
12345678:13
21443433:20
The outputs file Totals2 is:
12345678:13::
21443433:20::
but i want
12345678:13:... (3 Replies)
Dear All,
Please apology to me if this question already posted, because I try to find it but not found.
I have make bash script to automatically download data from ftp and this running very well. and after the data downloaded it will automatically extract the data and keep in the specific... (2 Replies)
How I can get the current make-file name in a make-file
So, if I run make with specified file:make -f target.mak
is it possible to have the 'target' inside of the that 'target.mak' from the file name? (2 Replies)
Hi,
I have written a small script from that iam appending the output to a file.If multiple users invoke the same script or if i invoke the same script n number of times (using &), the output file(ZZ/OUT) contains messup information.
#!/bin/bash
#
echo "Hello" >> /tmp/ZZ/OUT
sleep 10
echo... (4 Replies)
Hi Guys,
I have a file with around 1000 strings and i need to fetch the group to which each string belongs to from another file. Example is seen below.
File 1:
A
B
D
File 2:
START
A
B
C
END
START
M (5 Replies)
I'm trying to write a script in a directory that goes through the column the user specifies of 4 files that are inside the directory and calculates the min and the max values. This means that if the user specifies column 5, the script will go through column 5 of all 4 files and all that should give... (2 Replies)
Hi,
I am new to scripting. I have a log file and need to fetch specific logs and copy to another file.
A copy of the log is like this:
===============================================================
= JOB : server123#jobs1.jobstream1
= USER : andyc
= Tue 08/01/17... (3 Replies)
Discussion started by: Prngp
3 Replies
LEARN ABOUT CENTOS
pmgetarchivelabel
PMGETARCHIVELABEL(3) Library Functions Manual PMGETARCHIVELABEL(3)NAME
pmGetArchiveLabel - fetch the label record from a performance metrics archive log
C SYNOPSIS
#include <pcp/pmapi.h>
int pmGetArchiveLabel(pmLogLabel *lp);
cc ... -lpcp
DESCRIPTION
Within the framework of the Performance Co-Pilot (PCP), archive logs of performance metrics values may be accumulated and saved using the
program pmlogger(1).
The routine pmGetArchiveLabel may be used to fetch the label record from an archive log that has already been opened using pmNewContext(3),
or pmDupContext(3), and thereby associated with the current Performance Metrics Application Programming Interface (PMAPI) context.
The result returned via the pointer lp is a structure that must be pre-allocated by the caller and has the following format (defined in
pmapi.h).
/*
* Label Record at the start of every log file
*/
typedef struct {
int ll_magic; /* PM_LOG_MAGIC | log format version no. */
pid_t ll_pid; /* PID of logger */
struct timeval ll_start;/* start of this log */
char ll_hostname[PM_LOG_MAXHOSTLEN]; /* name of collection host */
char ll_tz[40]; /* $TZ at collection host */
} pmLogLabel;
For an application, the most useful information from the archive label is likely to be in the fields ll_start, ll_hostname or ll_tz.
Note that the size of the ll_hostname field is PM_LOG_MAXHOSTLEN (64 bytes) which is less than MAXHOSTNAMELEN (see gethostbyname(3)) on
some platforms. These semantics are necessary to retain backwards compatibility with the PCP archive file format.
pmGetArchiveLabel returns zero for success.
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). Values for these variables may be obtained programmatically using the pmGetConfig(3) function.
SEE ALSO pmlogger(1), PMAPI(3), pmDupContext(3), pmGetConfig(3), pmNewContext(3), pcp.conf(5) and pcp.env(5).
DIAGNOSTICS
PM_ERR_NOCONTEXT
the current PMAPI context is either invalid, or not associated with an archive log
Performance Co-Pilot PCP PMGETARCHIVELABEL(3)