Sponsored Content
Top Forums Shell Programming and Scripting Ps -ef|grep <processname> usage in IF statement Post 302835597 by RudiC on Monday 22nd of July 2013 05:11:17 PM
Old 07-22-2013
Try
Code:
ps -ef|
awk     '/HPII_val/     {HPV=1}
         /HPII_imp/     {HPI=1}
         /cold_dai/     {CDD=1}
         /cold_377/     {CD7=1}
         /bes_commit 1/ {BC1=1}
         /bes_commit 2/ {BC2=1}
         /post_ind/     {POI=1}
         END            {if (HPV && HPI) print "HPII is running fine without any issues"
                         if (CDD && CD7) print "COLD is running fine without any issues"
                         if (BC1 && BC2) print "BES is running fine without any issues" 
                         if (POI)        print "POST Index services is fine"
                        }
        '

and report back.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

grep usage

grep can filter the text which want to display, but if I want it do not show the text specific in grep, how to do? thk a lot! (2 Replies)
Discussion started by: zp523444
2 Replies

2. UNIX for Dummies Questions & Answers

Grep usage help

Hello, I have a list in .txt format of email addresses and I need to extract just a specific domain ... The list format is like: "123456";"user@domain.com";"email";"john";"name" "123457";"user2@domain.com";"email";"john";"name" "123458";"user3@domain.com";"email";"john";"name"... (7 Replies)
Discussion started by: holyearth
7 Replies

3. UNIX for Dummies Questions & Answers

PID - Getting the processname of terminated/old Process

Hi all! I'm using CentOS 5.2 with KDE. Is it possible to get a processname/cmd of a terminated process (= PID not present with PS-command) ? Are the processnames/scriptnames logged somewhere? (I did not find them in /var/log/messages) (5 Replies)
Discussion started by: JohnMurdoch
5 Replies

4. UNIX for Dummies Questions & Answers

Grep Usage

Hello, I am trying to use grep to locate multiple uses of the same word in the same line. The word has to be 3+ char, upper or lower or both. I tried this code <code> grep \({3,}\)*\1 i* </code> and i turned out zero results. Any ideas? ____________________________________________... (5 Replies)
Discussion started by: Omega1589
5 Replies

5. HP-UX

how can I find cpu usage memory usage swap usage and logical volume usage

how can I find cpu usage memory usage swap usage and I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times my final destination is monitor process logical volume usage above X % and number of Logical voluage above can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies

6. UNIX for Advanced & Expert Users

Grep usage

my file contains xxabced.p dlksfad; dflsdkjflkds flksdjflkdioewf erfsdlkfjsdla; dlkfjsd;lfkj msgdadf.p dslk kdjflksdjfl;asdfasdfjkljl fdsf;jd ppuskldf.p i want the output is xxabced.p msgdadf.p ppuskldf.p Can any one give the command? (1 Reply)
Discussion started by: kingganesh04
1 Replies

7. AIX

How to monitor the IBM AIX server for I/O usage,memory usage,CPU usage,network..?

How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies

8. Shell Programming and Scripting

usage of case statement in place of IF elif...

Hi, I need to carry out the back up of the data if exists...(file size not equal to zero) i tried in this way but it is not successful....where am making the mistakes? and if possible can i use case syntax in place of "if" #!/bin/ksh filename=`TZ=CST+24 date +%Y%m%d` ZERO=0... (3 Replies)
Discussion started by: aemunathan
3 Replies

9. Homework & Coursework Questions

grep usage help?

Use and complete the template provided. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: I have to find all the files where the function sequentialInsert is called and the directory is ~cs252/Assignments/commandsAsst/project 2.... (2 Replies)
Discussion started by: jennkat
2 Replies

10. Shell Programming and Scripting

Arguments in usage statement

Hello, I have a question regarding the usage statement of a script. I have 2 parameters "--pto" and "--pto_list". To start the script I will need one of them. Both together are not possible. How this would be printed out within a usage statement? My suggestion would be: Usage:... (4 Replies)
Discussion started by: API
4 Replies
XmPrintPopupPDM(library call)											     XmPrintPopupPDM(library call)

NAME
XmPrintPopupPDM -- Send a notification for the PDM to be popped up SYNOPSIS
#include <Xm/Print.h> XtEnum XmPrintPopupPDM( Widgetprint_shell, Widgetvideo_transient_for); DESCRIPTION
A convenience function that sends a notification to start a Print Dialog Manager on behalf of the application, XmPrintPopupPDM hides the details of the X selection mechanism used to notify the PDM that a new dialog must be popped up for this application. XmPrintPopupPDM sends a selection request to either the print display of the print shell, or the video display of the transient_for video widget (depending on the environment variable XPDMDISPLAY, which can only takes the value "print" or "video"), asking for the PDM windows to be popped up on behalf of the app. Return right away with status of XmPDM_NOTIFY_FAIL (e.g. if the function couldn't malloc memory for the selection value, or if XPDMDISPLAY is not "print" or "video") or with XmPDM_NOTIFY_SUCCESS , which only means a "message" was sent out to the PDM specified by XPDMSELECTION , not that it's already up on the screen yet. In order to know if the PDM is up, or not running, the application must register a XmNpdmNotificationCallback with the Print Shell. XmPrintPopupPDM puts up an InputOnly window on top of the dialog, so that the end user doesn't use the print setup dialog while the PDM is trying to come up. This window is automatically removed when the shell is about to call the callback for the first time. print_shell The Print Shell used for this print job and context. video_transient_for The video widget dealing with application print setup. RETURN VALUE
Returns XmPDM_NOTIFY_SUCCESS if the function was able to send the notification out to the PDM process, XmPDM_NOTIFY_FAIL otherwise. ERRORS
/WARNINGS Not applicable. EXAMPLES
Example of callback from a Print set up dialog box "Setup..." button: PrintSetupCallback(print_dialog...) /*-------------*/ { if (XmPrintPopupPDM (pshell, XtParent(print_dialog)) != XmPDM_NOTIFY_SUCCESS) { /* some error dialog */ } } Example of XmNpdmNotificationCallback from a Print Shell: pdmNotifyCB(print_shell...) { XmPrintShellCallBackStruct * pr_cb = ... switch (pr_cb->reason) { case XmCR_PDM_NONE: /* no PDM available */ PostErrorDialog(...); break; case XmCR_PDM_VXAUTH: /* PDM is not authorized ... */ PostErrorDialog(...); break; case XmCR_PDM_UP: the PDM is up and running /* everything is fine */ break; default: /* other cases */ } } SEE ALSO
XmPrintSetup(3), XmPrintShell(3), XmRedisplayWidget(3), XmPrintToFile(3) XmPrintPopupPDM(library call)
All times are GMT -4. The time now is 08:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy