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
glance_api_selinux(8)					     SELinux Policy glance_api					     glance_api_selinux(8)

NAME
glance_api_selinux - Security Enhanced Linux Policy for the glance_api processes DESCRIPTION
Security-Enhanced Linux secures the glance_api processes via flexible mandatory access control. The glance_api processes execute with the glance_api_t SELinux type. You can check if you have these processes running by executing the ps command with the -Z qualifier. For example: ps -eZ | grep glance_api_t ENTRYPOINTS
The glance_api_t SELinux type can be entered via the glance_api_exec_t file type. The default entrypoint paths for the glance_api_t domain are the following: /usr/bin/glance-api PROCESS TYPES
SELinux defines process types (domains) for each process running on the system You can see the context of a process using the -Z option to ps Policy governs the access confined processes have to files. SELinux glance_api policy is very flexible allowing users to setup their glance_api processes in as secure a method as possible. The following process types are defined for glance_api: glance_api_t Note: semanage permissive -a glance_api_t can be used to make the process type glance_api_t permissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. BOOLEANS
SELinux policy is customizable based on least access required. glance_api policy is extremely flexible and has several booleans that allow you to manipulate the policy and run glance_api with the tightest access possible. If you want to allow all daemons to write corefiles to /, you must turn on the daemons_dump_core boolean. Disabled by default. setsebool -P daemons_dump_core 1 If you want to enable cluster mode for daemons, you must turn on the daemons_enable_cluster_mode boolean. Enabled by default. setsebool -P daemons_enable_cluster_mode 1 If you want to allow all daemons to use tcp wrappers, you must turn on the daemons_use_tcp_wrapper boolean. Disabled by default. setsebool -P daemons_use_tcp_wrapper 1 If you want to allow all daemons the ability to read/write terminals, you must turn on the daemons_use_tty boolean. Disabled by default. setsebool -P daemons_use_tty 1 If you want to deny any process from ptracing or debugging any other processes, you must turn on the deny_ptrace boolean. Enabled by default. setsebool -P deny_ptrace 1 If you want to allow all domains to use other domains file descriptors, you must turn on the domain_fd_use boolean. Enabled by default. setsebool -P domain_fd_use 1 If you want to allow all domains to have the kernel load modules, you must turn on the domain_kernel_load_modules boolean. Disabled by default. setsebool -P domain_kernel_load_modules 1 If you want to allow all domains to execute in fips_mode, you must turn on the fips_mode boolean. Enabled by default. setsebool -P fips_mode 1 If you want to enable reading of urandom for all domains, you must turn on the global_ssp boolean. Disabled by default. setsebool -P global_ssp 1 If you want to allow confined applications to use nscd shared memory, you must turn on the nscd_use_shm boolean. Enabled by default. setsebool -P nscd_use_shm 1 MANAGED FILES
The SELinux process type glance_api_t can manage files labeled with the following file types. The paths listed are the default paths for these file types. Note the processes UID still need to have DAC permissions. cluster_conf_t /etc/cluster(/.*)? cluster_var_lib_t /var/lib/pcsd(/.*)? /var/lib/cluster(/.*)? /var/lib/openais(/.*)? /var/lib/pengine(/.*)? /var/lib/corosync(/.*)? /usr/lib/heartbeat(/.*)? /var/lib/heartbeat(/.*)? /var/lib/pacemaker(/.*)? cluster_var_run_t /var/run/crm(/.*)? /var/run/cman_.* /var/run/rsctmp(/.*)? /var/run/aisexec.* /var/run/heartbeat(/.*)? /var/run/cpglockd.pid /var/run/corosync.pid /var/run/rgmanager.pid /var/run/cluster/rgmanager.sk glance_tmp_t glance_var_lib_t /var/lib/glance(/.*)? glance_var_run_t /var/run/glance(/.*)? root_t / /initrd FILE CONTEXTS
SELinux requires files to have an extended attribute to define the file type. You can see the context of a file using the -Z option to ls Policy governs the access confined processes have to these files. SELinux glance_api policy is very flexible allowing users to setup their glance_api processes in as secure a method as possible. STANDARD FILE CONTEXT SELinux defines the file context types for the glance_api, if you wanted to store files with these types in a diffent paths, you need to execute the semanage command to sepecify alternate labeling and then use restorecon to put the labels on disk. semanage fcontext -a -t glance_api_exec_t '/srv/glance_api/content(/.*)?' restorecon -R -v /srv/myglance_api_content Note: SELinux often uses regular expressions to specify labels that match multiple files. The following file types are defined for glance_api: glance_api_exec_t - Set files with the glance_api_exec_t type, if you want to transition an executable to the glance_api_t domain. glance_api_initrc_exec_t - Set files with the glance_api_initrc_exec_t type, if you want to transition an executable to the glance_api_initrc_t domain. Note: File context can be temporarily modified with the chcon command. If you want to permanently change the file context you need to use the semanage fcontext command. This will modify the SELinux labeling database. You will need to use restorecon to apply the labels. COMMANDS
semanage fcontext can also be used to manipulate default file context mappings. semanage permissive can also be used to manipulate whether or not a process type is permissive. semanage module can also be used to enable/disable/install/remove policy modules. semanage boolean can also be used to manipulate the booleans system-config-selinux is a GUI tool available to customize SELinux policy settings. AUTHOR
This manual page was auto-generated using sepolicy manpage . SEE ALSO
selinux(8), glance_api(8), semanage(8), restorecon(8), chcon(1), sepolicy(8) , setsebool(8) glance_api 14-06-10 glance_api_selinux(8)