Sponsored Content
Top Forums Shell Programming and Scripting Using top command to email if process is exceeding 25% and sending an email alert if so Post 302603909 by jay02 on Friday 2nd of March 2012 09:25:46 AM
Old 03-02-2012
Java Using top command to email if process is exceeding 25% and sending an email alert if so

This is my first time writing a script and Im having some trouble,
Im trying to use the top command to monitor processes and the amount of CPU usage they require, my aim is to get an email if a process takes over a certain percentage of CPU usage
I tried grep [25%-100%]
Obviosly that hasnt worked,
Any help would be much appreciated Smilie

FYI im using the bash shell for the script
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Sending email

I have an Solaris 8 machine running a managment application. One of the features of this application is to configure alarm forwarding to an email undress. When i configured the application to do that, it asked me only about the recipient email address. Quesiton: how to configure my Solaris 8... (7 Replies)
Discussion started by: bcheaib
7 Replies

2. UNIX for Dummies Questions & Answers

sending email

hi, is there any possiblity to send email from the command prompt, for eg i want to send alert to any mail id like /data/logs is 80% to my hotmail account , xxx@hotmail.com is this really possible,, if not, then what are the prerequistes need to do this (1 Reply)
Discussion started by: vasikaran
1 Replies

3. Shell Programming and Scripting

Sending find command results to email

This is probably simple so forgive me... I just want to find all files in a folder created within the last 10 minutes... This is easy: # find /home/folder -cmin -10 If the find command locates any files created in the last ten minutes I want it to send an email alert. I just want to... (3 Replies)
Discussion started by: gardellap
3 Replies

4. Shell Programming and Scripting

Sending an email with more than one files

Hi, I would like to send an email with more than one attachement. I am using uuencode. I want to achive by suing uuencode. Also please let me know other ways. -Thambi (7 Replies)
Discussion started by: thambi
7 Replies

5. UNIX for Dummies Questions & Answers

Sending email attachments

Hello, I've search the forum, but I cannot find an answer to my specific question. I'm trying to send some files to my professor. Upon his request, I used the following: tar -cvf vh.tar vh_part1.c vh_part2.c vh_part3.c vh_part4.c vh_sample_run15.txt uuencode vh.tar vh.tar > proj1 mail... (2 Replies)
Discussion started by: venush
2 Replies

6. AIX

email alerts for memory or cpu exceeding thresholds

Hi Guys, I hope this is an easy question: I need some kind of script or an idea how I can convince syslog to send an email to root or someone else once cpu usage exceeds 95% or the memory consumption (maybe via AVM value times 4k) exceeds 85% of my real memory on any of my 700 lpars. We're... (4 Replies)
Discussion started by: zxmaus
4 Replies

7. Shell Programming and Scripting

sending email as background process

Hi All, Solaris Bash v3x I have a script that accepts an error code, and if the error code is not 0 then an email is sent using mailx to details the error. I want to be able to implement the functiuonlity whereby i can send the email in a background process so the script can continue with... (3 Replies)
Discussion started by: satnamx
3 Replies

8. Linux

sending an email

I have used an already-built ActiveX control to send email from my asp web pages. One of the parameters I fill is FromName which defines the tittle the recipient will see in the From entrance in his Inbox. Now Iīm trying to use mail to send an email from a Shell but I havenīt found the... (1 Reply)
Discussion started by: RandomAccess
1 Replies

9. Shell Programming and Scripting

sending output of command via email

Hi all i want to send the output of a command by email, i have done this <comand> | mail -s <subject> <email address> which works well, but if the command retunrs noting then i just get a blank email, is there a way to stop this thanks Adam (4 Replies)
Discussion started by: ab52
4 Replies
NOTMUCH(1)						      General Commands Manual							NOTMUCH(1)

NAME
notmuch - thread-based email index, search, and tagging SYNOPSIS
notmuch command [args ...] DESCRIPTION
Notmuch is a command-line based program for indexing, searching, reading, and tagging large collections of email messages. This page describes how to get started using notmuch from the command line, and gives a brief overview of the commands available. For more information on e.g. notmuch show consult the notmuch-show(1) man page, also accessible via notmuch help show The quickest way to get started with Notmuch is to simply invoke the notmuch command with no arguments, which will interactively guide you through the process of indexing your mail. NOTE
While the command-line program notmuch provides powerful functionality, it does not provide the most convenient interface for that func- tionality. More sophisticated interfaces are expected to be built on top of either the command-line interface, or more likely, on top of the notmuch library interface. See http://notmuchmail.org for more about alternate interfaces to notmuch. The emacs-based interface to not- much (available under emacs/ in the Notmuch source distribution) is probably the most widely used at this time. COMMANDS
SETUP The notmuch setup command is used to configure Notmuch for first use, (or to reconfigure it later). The setup command will prompt for your full name, your primary email address, any alternate email addresses you use, and the directory con- taining your email archives. Your answers will be written to a configuration file in ${NOTMUCH_CONFIG} (if set) or ${HOME}/.notmuch-config . This configuration file will be created with descriptive comments, making it easy to edit by hand later to change the configuration. Or you can run notmuch setup again to change the configuration. The mail directory you specify can contain any number of sub-directories and should primarily contain only files with individual email mes- sages (eg. maildir or mh archives are perfect). If there are other, non-email files (such as indexes maintained by other email programs) then notmuch will do its best to detect those and ignore them. Mail storage that uses mbox format, (where one mbox file contains many messages), will not work with notmuch. If that's how your mail is currently stored, it is recommended you first convert it to maildir format with a utility such as mb2md before running notmuch setup . Invoking notmuch with no command argument will run setup if the setup command has not previously been completed. OTHER COMMANDS Several of the notmuch commands accept search terms with a common syntax. See notmuch-search-terms(7) for more details on the supported syntax. The search, show and count commands are used to query the email database. The reply command is useful for preparing a template for an email reply. The tag command is the only command available for manipulating database contents. The dump and restore commands can be used to create a textual dump of email tags for backup purposes, and to restore from that dump. The config command can be used to get or set settings int the notmuch configuration file. ENVIRONMENT
The following environment variables can be used to control the behavior of notmuch. NOTMUCH_CONFIG Specifies the location of the notmuch configuration file. Notmuch will use ${HOME}/.notmuch-config if this variable is not set. SEE ALSO
notmuch-config(1), notmuch-count(1), notmuch-dump(1), notmuch-hooks(5), notmuch-new(1), notmuch-reply(1), notmuch-restore(1), notmuch- search(1), notmuch-search-terms(7), notmuch-show(1), notmuch-tag(1) The notmuch website: http://notmuchmail.org CONTACT
Feel free to send questions, comments, or kudos to the notmuch mailing list <notmuch@notmuchmail.org> . Subscription is not required before posting, but is available from the notmuchmail.org website. Real-time interaction with the Notmuch community is available via IRC (server: irc.freenode.net, channel: #notmuch). Notmuch 0.13.2 2012-06-01 NOTMUCH(1)
All times are GMT -4. The time now is 08:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy