Solved

Linux: Count Mail Sent in Past Hour

Posted on 2013-11-15
3
347 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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks , hava a nice day and good weekend
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

743 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now