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
vwait(n)						       Tcl Built-In Commands							  vwait(n)

__________________________________________________________________________________________________________________________________________________

NAME
vwait - Process events until a variable is written SYNOPSIS
vwait varName _________________________________________________________________ DESCRIPTION
This command enters the Tcl event loop to process events, blocking the application if no events are ready. It continues processing events until some event handler sets the value of variable varName. Once varName has been set, the vwait command will return as soon as the event handler that modified varName completes. varName must be globally scoped (either with a call to global for the varName, or with the full namespace path specification). In some cases the vwait command may not return immediately after varName is set. This can happen if the event handler that sets varName does not complete immediately. For example, if an event handler sets varName and then itself calls vwait to wait for a different variable, then it may not return for a long time. During this time the top-level vwait is blocked waiting for the event handler to complete, so it cannot return either. EXAMPLES
Run the event-loop continually until some event calls exit. (You can use any variable not mentioned elsewhere, but the name forever reminds you at a glance of the intent.) vwait forever Wait five seconds for a connection to a server socket, otherwise close the socket and continue running the script: # Initialise the state after 5000 set state timeout set server [socket -server accept 12345] proc accept {args} { global state connectionInfo set state accepted set connectionInfo $args } # Wait for something to happen vwait state # Clean up events that could have happened close $server after cancel set state timeout # Do something based on how the vwait finished... switch $state { timeout { puts "no connection on port 12345" } accepted { puts "connection: $connectionInfo" puts [lindex $connectionInfo 0] "Hello there!" } } SEE ALSO
global(n), update(n) KEYWORDS
event, variable, wait Tcl 8.0 vwait(n)