Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

AIX Script help

Posted on 2014-03-31
3
297 Views
Last Modified: 2014-04-01
Can someone provide me like a script which checks  whether any aixterm has “too many” children processes. If there are too many like more than 100, Alert via email...
0
Comment
Question by:aanya247
  • 2
3 Comments
 
LVL 40

Accepted Solution

by:
omarfarid earned 500 total points
ID: 39968356
Please you need to modify below script to fit your need:

mytty=`tty`
nop=`ps -t $mytty | wc -l`
if $nop -gt 100
then
      mail -s "too many processes running on $mytty" username@domain
fi
0
 

Author Comment

by:aanya247
ID: 39968422
Does ps -t mean child processes
0
 
LVL 40

Expert Comment

by:omarfarid
ID: 39968447
The command

ps -t ttyname

will show all processes attached to that tty. Processes that are detached from tty will not be reported.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

838 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question