Sponsored Content
Operating Systems AIX Command or script to inform server owner about process Post 302852339 by smoofy on Wednesday 11th of September 2013 10:09:32 AM
Old 09-11-2013
You can periodically with cron check if process is up via ps command and if not you can send an email to him for example.
Code:
ps auxx | grep sleep | grep -v grep
if [ $? == 1 ]
then
  echo "Sleep is down." | mail -s "Server xyz report" admin@mail.com
else
  echo "Sleep is up." | mail -s "Server xyz report" admin@mail.com
fi

---------- Post updated at 03:09 PM ---------- Previous update was at 03:08 PM ----------

I used an sleep function here which could be easily used for this purpose.
This User Gave Thanks to smoofy For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Changing the process owner

How do I change the owner of the process in runtime.I'm working AIX. I would appreciate ,If I get sample scripts. (1 Reply)
Discussion started by: kkb_karthi
1 Replies

2. UNIX for Dummies Questions & Answers

Process owner

Hi there, How do I get the owner of a process? Regards (4 Replies)
Discussion started by: Parker_
4 Replies

3. UNIX for Advanced & Expert Users

how to check if a process is running in a server from shell script.

I want to write a unix shell script that will check if a process (say debu) is running in the server or not. If no , then send a mail to the corresponding person to start the process??? (2 Replies)
Discussion started by: debu
2 Replies

4. UNIX for Advanced & Expert Users

Is there a command to get the owner of a file?

At the moment I'm just using `ls -o` (with `cut`), but `ls` is obviously giving me a lot more output than just the file owner. (9 Replies)
Discussion started by: Bilge
9 Replies

5. Shell Programming and Scripting

script to monitor process running on server and posting a mail if any process is dead

Hello all, I would be happy if any one could help me with a shell script that would determine all the processes running on a Unix server and post a mail if any of the process is not running or aborted. Thanks in advance Regards, pradeep kulkarni. :mad: (13 Replies)
Discussion started by: pradeepmacha
13 Replies

6. UNIX for Advanced & Expert Users

How UNIX admin set up this? how files of 744 of other owner can be removed by another owner?

Hi all, We have some files are under 744 permissions and the the owner is say owner1 and group1. Now we have another user owner2 of group2, owner2 can remove files of the owner1 and the permission of those files are 744, unix admin told us he did some config at his side so we can do that. ... (14 Replies)
Discussion started by: TheGunMan
14 Replies

7. UNIX for Advanced & Expert Users

command to find the owner of a db

Hi, Im working with an Informix db, i would like to know the command to identify the owner of a particular database Thanks (2 Replies)
Discussion started by: dvah
2 Replies

8. Shell Programming and Scripting

rm/mv command - not owner

Hi, I have two users, either of them can create a file. Either of them should be able to move/remove the file. When trying to do that I am getting error "Not owner". I have many times seen that we could "rm" or atleast "mv" even if the user is not the owner of the file. Does this have... (2 Replies)
Discussion started by: tostay2003
2 Replies

9. Solaris

Privileges : modify dir/file owner by other that's not owner

i need to do the following operations in solaris 10: 1.change owner and group owner for files which are not owned by the current user and user group 2.to can delete files in the /tmp directory which are not of the current user 3. allow to a standard user the deletion of files in the /tmp... (1 Reply)
Discussion started by: sirmark
1 Replies

10. Shell Programming and Scripting

Connect (SSH) to Windows server via Linux server through a script and passing command.. but failing

I am trying to connect to Windows server via Linux server through a script and run two commands " cd and ls " But its giving me error saying " could not start the program" followed by the command name i specify e g : "cd" i am trying in this manner " ssh username@servername "cd... (5 Replies)
Discussion started by: sunil seelam
5 Replies
XSetSelectionOwner(3X11)					     MIT X11R4						  XSetSelectionOwner(3X11)

Name
       XSetSelectionOwner, XGetSelectionOwner, XConvertSelection - manipulate window selection

Syntax
       XSetSelectionOwner(display, selection, owner, time)
	  Display *display;
	  Atom selection;
	  Window owner;
	  Time time;

       Window XGetSelectionOwner(display, selection)
	  Display *display;
	  Atom selection;

       XConvertSelection(display, selection, target, property, requestor, time)
	  Display *display;
	  Atom selection, target;
	  Atom property;
	  Window requestor;
	  Time time;

Arguments
       display	 Specifies the connection to the X server.

       owner	 Specifies the owner of the specified selection atom.  You can pass a window or

       property  Specifies the property name.  You also can pass

       requestor Specifies the requestor.

       selection Specifies the selection atom.

       target	 Specifies the target atom.

       time	 Specifies the time.  You can pass either a timestamp or

Description
       The function changes the owner and last-change time for the specified selection and has no effect if the specified time is earlier than the
       current last-change time of the specified selection or is later than the current X server time.	Otherwise, the last-change time is set to
       the specified time, with replaced by the current server time.  If the owner window is specified as then the owner of the selection becomes
       (that is, no owner).  Otherwise, the owner of the selection becomes the client executing the request.

       If the new owner (whether a client or is not the same as the current owner of the selection and the current owner is not the current owner
       is sent a event.  If the client that is the owner of a selection is later terminated (that is, its connection is closed) or if the owner
       window it has specified in the request is later destroyed, the owner of the selection automatically reverts to but the last-change time is
       not affected.  The selection atom is uninterpreted by the X server.  returns the owner window, which is reported in and events.	Selections
       are global to the X server.

       can generate and errors.

       The function returns the window ID associated with the window that currently owns the specified selection.  If no selection was specified,
       the function returns the constant If is returned, there is no owner for the selection.

       can generate a error.

       requests that the specified selection be converted to the specified target type:

       o    If the specified selection has an owner, the X server sends a event to that owner.

       o    If no owner for the specified selection exists, the X server generates a event to the requestor with property

       The arguments are passed on unchanged in either of the events.  There are two predefined selection atoms: PRIMARY and SECONDARY.

       can generate and errors.

Diagnostics
       A value for an Atom argument does not name a defined Atom.

       A value for a Window argument does not name a defined Window.

See Also
       X Window System: The Complete Reference, Second Edition, Robert W. Scheifler and James Gettys

															  XSetSelectionOwner(3X11)
All times are GMT -4. The time now is 04:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy