Actually there are only 6 log files which covers the whole day of logs( sometimes a combination of *gz and *Z files or all *gz files or all *Z files depending on the log size upon rotation).
Logs will be huge when (g)unzip, im afraid of having an FS issue by doing so i decided to use zcat | grep and gzgrep. Im sorry but im such a newbie and not so familiar with
"awk" command as you recommended.
The scripts will look like this:
Kindly let me know if you have better solution for this. I would really appreciate your response. Thanks!
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
Dear experts,
I'm trying to write a script to calculate the usage of Log Archive in a directory, so if it gets to a point where the directory size is 60%, then send out an FYI.. email. So if then it reaches to 80%, move the logs from that directory.
I have written the script as follow but... (10 Replies)
Hi
I am trying to figure out what the following line does, I work in ksh88:
] && LIST="$big $LIST"
Not sure what "-a" means in that case.
Thanks a lot for any advice -A (1 Reply)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Hi Guys,
I'm sorry but I can't find answer for this, what is the meaning of -s option in "if" statement on unix scipting. Please see sample below:
opath=/home/output
for i in N1 N2 N3 N4
do
echo $i
if
then
grep $i $opath/N5_CRAI > $opath/N5_$i.crai
chmod 777 $opath/N5_$i.crai
... (7 Replies)
Hello,
I am somewhat new to Linux/Unix. I am currently working on a shell script that is suppose to cat a file, grep the same file for a certain line, if that line is found save the file in a different location, else remove the file.
This is a rough example of what I want.
$Dating = False... (13 Replies)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Hi 2 all,
i have had AIX 7.2
:/# /usr/IBMAHS/bin/apachectl -v
Server version: Apache/2.4.12 (Unix)
Server built: May 25 2015 04:58:27
:/#:/# /usr/IBMAHS/bin/apachectl -M
Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
mpm_worker_module (static)
... (3 Replies)
Discussion started by: penchev
3 Replies
LEARN ABOUT CENTOS
pmfetcharchive
PMFETCHARCHIVE(3) Library Functions Manual PMFETCHARCHIVE(3)NAME
pmFetchArchive - get performance metrics directly from an archive log
C SYNOPSIS
#include <pcp/pmapi.h>
int pmFetchArchive(pmResult **result);
cc ... -lpcp
DESCRIPTION
pmFetchArchive is a variant of pmFetch(3) that may only be used when the current Performance Metrics Application Programming Interface
(PMAPI) context is associated with an archive log.
The result is instantiated with all of the metrics (and instances) from the next archive record, consequently there is no notion of a list
of desired metrics, and the instance profile of the PMAPI context is ignored.
It is expected that pmFetchArchive would be used to create utilities that scan archive logs, while the more common access to the archives
would be via the pmFetch(3) interface.
To skip records within the archive log, use pmSetMode(3) to change the collection time within the current PMAPI context, then call
pmFetchArchive.
Note that the result returned by pmFetchArchive is dynamically allocated, and must be released using pmFreeResult(3), not free(3C). See
pmFetch(3) and pmFreeResult(3) for further details.
pmFetchArchive returns zero on success.
SEE ALSO PMAPI(3), pmFetch(3), pmFreeResult(3), pmNewContext(3), pmSetMode(3) and pmTrimNameSpace(3).
DIAGNOSTICS
PM_ERR_NOTARCHIVE
the current PMAPI context is not associated with an archive log
Performance Co-Pilot PCP PMFETCHARCHIVE(3)