glance adviser suppress newline in print command


 
Thread Tools Search this Thread
Operating Systems HP-UX glance adviser suppress newline in print command
# 1  
Old 12-29-2011
glance adviser suppress newline in print command

Hi,
I have a glance adviser, the highlights below. The problem that i have is that every time glance finds process name "abc" it write the memory region data in a new line. My question is if i have a way to print without newline?

The output line for process abc looks something like this:
Date,Proc name,PID,CPU Util,Proc MEM RES,RES DATA,RES SHM
12/29/2011,abc,25331,0.0
3730.00,1707.27

if GBL_INTERVAL == GBL_INTERVAL_CUM then { //Printing header
PRINT "Date,Proc name,PID,CPU Util,Proc MEM RES, RES DATA,RES SHM "
}
PROCESS LOOP{
IF(PROC_PROC_NAME == "abc" OR
(PROC_CPU_TOTAL_UTIL > 3 ) THEN {
PRINT GBL_STATDATE, ",",
PROC_PROC_NAME, ",",
PROC_PROC_ID, ",",
PROC_CPU_TOTAL_UTIL, ",",
(PROC_MEM_RES/1024 + 0 )|20|2
}//end if
IF PROC_PROC_NAME == "abc" THEN {
x=0
PROC_REGION LOOP {
IF x == 0 THEN {
PRINT (PROC_REGION_RES_DATA/1024 + 0 )|20|2, ",",
(PROC_REGION_RES_SHMEM/1024 + 0 )|20|2
}//end if x==0
x=1
}//end region loop
}//end if PROC_PROC_NAME == "abc"
}//end process loop
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to suppress error in following command?

I have a file containing data in multiple columns. The colums are seperated by pipe (|). I need to extract information as below: myfile_20130929_781;10;100.00 where myfile.txt is the file name. 10 is the number of records in the file starting with 120 and 100.00 is the sum of 26th field of... (16 Replies)
Discussion started by: angshuman
16 Replies

2. UNIX for Dummies Questions & Answers

Print a newline after first match in line

Hi everyone I have a file where CP occurs both within each line and at the very end: dwer 17 knsdask= * CP hwla 17 h'wopie un CP I would like to separate the line on the first CP to get: dwer 17 knsdask= * CP hwla 17 h'wopie un CP What I have so far is: awk '{for (x=1; x<NF; x++) ... (5 Replies)
Discussion started by: meet77
5 Replies

3. Shell Programming and Scripting

How to print in newline through script?

For Example, echo `date` > test.txt echo $hostname>> SuccessLogin.txt; echo '\n'login is successful>> SuccessLogin.txt echo $hostname>> FailureLogin.txt; echo '\n'login is failure>> failureLogin.txt now i want to print the O/P in newline for every host i logged into, then i have to... (4 Replies)
Discussion started by: lravip123
4 Replies

4. HP-UX

oracle processes with SOCKT in glance command....reason?

Hi Friends, I could see following oracle process in the glance command. i see nothing running in the database although. I tried google it but no success. Another team ,which needs all the processes on the server is complaining. Can someone help me what exactly are these sessions/ how to ... (1 Reply)
Discussion started by: kunwar
1 Replies

5. HP-UX

Glance command Usage

Hello We have used Glance command to check Cpu Uage , bit new to Glance command , HP-UXdev # glance B3692A GlancePlus C.03.71.00 18:21:16 nedunix2 9000/800 Current Avg High -------------------------------------------------------------------------------- CPU Util S SN NU | 43% 59%... (1 Reply)
Discussion started by: lukas_pise
1 Replies

6. Shell Programming and Scripting

how to suppress list number from history command output

i run history command and I want to eliminate the list number. So far this perl script works as long as the list is a exact 3 character long. cat dd | perl -pe 's,\d{3},,' 70 export JAVA_HOME=. 81 export JAVA_HOME=. 82 export JAVA_HOME=`pwd` export JAVA_HOME=`pwd` ... (1 Reply)
Discussion started by: soemac
1 Replies

7. Solaris

I want a command in solaris equivalent to glance in HP-UX

Hi, C an someone help me out in getting the command to get system statistics like CPU, DISK and I/O utilization in a single command instead of mpstat,vmstat and iostat. When i give sar, getting the following error, bash-3.00# sar sar: can't open /var/adm/sa/sa15 No such... (6 Replies)
Discussion started by: grrajeish
6 Replies
Login or Register to Ask a Question