Solved

Linux: Count Mail Sent in Past Hour

Posted on 2013-11-15
3
350 Views
Last Modified: 2013-11-15
From a Linux command line is there any way to find out how many email messages have been sent by the server within the past hour?
0
Comment
Question by:hankknight
  • 3
3 Comments
 
LVL 13

Expert Comment

by:duncanb7
ID: 39651367
find  /var/log/maillog  -mmin -60 |xargs grep -c "Message accepted for delivery" |wc -l

/var/log/maillog , mail log file may put into diff dir depend on your system



Note: for find with last hour
==============================
find srch_dir -cmin -60 # creation time

or


find srch_dir -mmin -60 # modification time
or


 find srch_dir -amin -60 # access time
0
 
LVL 13

Accepted Solution

by:
duncanb7 earned 500 total points
ID: 39651486
find  /var/log/maillog  -mmin -60 |xargs grep -c "Message accepted for delivery" |wc -l

Could you try this  that I changed ?
0
 
LVL 13

Expert Comment

by:duncanb7
ID: 39651670
Thanks , hava a nice day and good weekend
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
AWS RDS 3 83
nagios monitor 3 54
High Bandwidth Usage 6 53
centos commands 6 49
How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

805 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