Sponsored Content
Top Forums Shell Programming and Scripting How do I calculate total number of active and non active hosts? Post 302761877 by RudiC on Sunday 27th of January 2013 09:42:57 AM
Old 01-27-2013
Sorry? If you run your loop over the 10 hosts in your code snippet, for every host responding it will execute the then branch and increment cnt in there, so cnt will hold the No. of active hosts afterwards. Did you give it a shot, after all?
 

8 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Active / Non Active users ?

Hey, I have few Questions : 1. How to Check/Find who all are the users accessing the server using their id ? 2. How to Check who is the active user or non active user (whose id exists but the access privileges has been removed) ? I am presently using AIX5.3 as a server. Please suggest... (3 Replies)
Discussion started by: varungupta
3 Replies

2. AIX

Question about HACMP for active-active mode

Hi all, I am new to HACMP. So sorry for the newie question. But I did search the forum and it seems that no one asks this before. So if a 2-node cluster runs in active-active mode (and the same application), what is the benefit of using HACMP ? If it runs in active-stanby, it is easy to... (9 Replies)
Discussion started by: qiulang
9 Replies

3. Shell Programming and Scripting

Calculate total space, total used space and total free space in filesystem names matching keyword

Good afternoon! Im new at scripting and Im trying to write a script to calculate total space, total used space and total free space in filesystem names matching a keyword (in this one we will use keyword virginia). Please dont be mean or harsh, like I said Im new and trying my best. Scripting... (4 Replies)
Discussion started by: bigben1220
4 Replies

4. Web Development

How to find number of http connections active currently in apache web server

Hi I have a solaris 9 OS with apache web server running on top of it. i want to know how many http connections are active at any point in time. (In other words how many users are accessing my website it at any moment of time) How to get it..? hit counters are not required... ----------... (0 Replies)
Discussion started by: aemunathan
0 Replies

5. Solaris

Link based Active Active IPMP

Hi, I need to configure 4 ip address (same subnet and mask) in one ipmp group (two interfaces) in an active active formation (link based). Can some one provide the steps or a tutorial link. Thanks (2 Replies)
Discussion started by: Mack1982
2 Replies

6. Shell Programming and Scripting

How to calculate the total number of weeks from a specify year?

Hi anyone can help? How to calculate total number of weeks from a specify date, for example, 01 Jan 2012. Thx! (2 Replies)
Discussion started by: rayray2013
2 Replies

7. UNIX for Beginners Questions & Answers

Find number of ACTIVE SSH putty sessions, excluding where the user hopped on to a diff server

Hi - If iam logged on to server A, on 4 putty windows using SSH ... and out of these 4 logged-in sessions, in one of the sessions if i did SSH from server A to server B; i would now have 4 putty windows sessions ... of which 3 are actively logged on to Server A while 1 putty window is actively... (2 Replies)
Discussion started by: i4ismail
2 Replies

8. Solaris

How to calculate total number of cores on my servers ?

Hi, I want to get total number of cores on my all non-global zones on Solaris 10. I got two methods and both are giving different results. Below link is a script, which tells me that total cores are 8 Mandalika's scratchpad: Oracle Solaris: Show Me the CPU, vCPU, Core Counts and the... (4 Replies)
Discussion started by: ron323232
4 Replies
NOTIFY(3PVM)							  PVM Version 3.4						      NOTIFY(3PVM)

NAME
pvm_notify - Request notification of PVM event such as host failure. SYNOPSIS
C int info = pvm_notify( int what, int msgtag, int cnt, int *tids ) Fortran call pvmfnotify( what, msgtag, cnt, tids, info ) PARAMETERS
what Type of event to trigger the notification. Presently one of: Value Meaning PvmTaskExit Task exits or is killed PvmHostDelete Host is deleted or crashes PvmHostAdd New host is added msgtag Message tag to be used in notification. cnt For PvmTaskExit and PvmHostDelete, specifies the length of the tids array. For PvmHostAdd, specifies the number of times to notify. tids For PvmTaskExit and PvmHostDelete, an array of length cnt of task or pvmd TIDs to be notified about. The array is not used with the PvmHostAdd option. info Integer status code returned by the routine. Values less than zero indicate an error. DESCRIPTION
The routine pvm_notify requests PVM to notify the caller on detecting certain events. One or more notify messages (see below) are sent by PVM back to the calling task. The messages have tag msgtag supplied to notify. The notification messages have the following format: PvmTaskExit One notify message for each TID requested. The message body contains a single TID of exited task. PvmHostDelete One notify message for each TID requested. The message body contains a single pvmd-TID of exited pvmd. PvmHostAdd cnt notify messages are sent, one each time the local pvmd's host table is updated. The message body contains an integer length followed by a list of pvmd-TIDs of new pvmds. The counter of PvmHostAdd messages yet to be sent is replaced by successive calls to pvm_notify. Specifying a cnt of -1 turns on PvmHostAdd messages until a future notify; a count of zero disables them. TIDs in the notify messages are packed as integers. The calling task is responsible for receiving messages with the specified tag and taking appropriate action. Future versions of PVM may expand the list of available notification events. EXAMPLES
C: info = pvm_notify( PvmTaskExit, 9999, ntask, tids ); Fortran: CALL PVMFNOTIFY( PVMHOSTDELETE, 1111, NUMHOSTS, DTIDS, INFO ) To "cancel" a notify request in PVM, the pvm_notify routine can be re-invoked with an additional PvmNotifyCancel flag in the what argument. The remaining arguments to this cancelling invocation must match the original invocation exactly, aside from the additional PvmNotifyCancel which can be added(+) or OR-ed(|) to the what argument: pvm_notify( PvmTaskExit, 9999, ntask, tids ); . . . pvm_notify( PvmTaskExit | PvmNotifyCancel, 9999, ntask, tids ); Note that when a notify is cancelled, the notify message is delivered, as if the given event (i.e. task exit, host add or delete) had occurred. ERRORS
PvmSysErr pvmd not responding. PvmBadParam giving an invalid argument value. SEE ALSO
pvm_tasks(3PVM), pvm_config(3PVM) 31 January, 1994 NOTIFY(3PVM)
All times are GMT -4. The time now is 06:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy