In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
What are the concrete ideas and operation steps of realizing automatic mail alarm with full disk in windows system? I believe that many inexperienced people do not know what to do about it. Therefore, this paper summarizes the causes and solutions of the problems. Through this article, I hope you can solve this problem.
Under the Windows system, if the disk that appears in the software is full, how to realize the automatic mail alarm when the disk is full? Only in this way can we know that the disk is full! Now let's go and have a look!
The problem is divided into two steps: one is how to monitor the disk capacity, and the other is how to automatically mail the alarm.
There are two solutions to the first problem, one is to write a bat script using the wmic command on the command line, and the other is to use the performance monitoring that comes with windows. The first method is troublesome, and the second method is used here.
Thus, the overall detailed steps are as follows:
The first step is to enable the performance feature
In the server, click "start → run", enter the "perfmon.msc" command in the "run" dialog box, and then enter, and then pop up the "performance" management main window. Then expand the "performance Log and Alerts → Alerts" option, and then you can use "New Alert Settings" to monitor the remaining amount of server space. When the server's remaining space is lower than a certain value, it will alert the administrator to warn you that there is insufficient space.
Step 2: create a new warning setting
Next, create a new alert setting to monitor the amount of disk space left.
In the "performance" management main window, right-click the "Alert" option, select the "New Alert Settings" option in the pop-up menu, pop up the New Alert Settings dialog box, and give the alert a name in the "name" column, such as "Diskfree". Click the "OK" button to enter the alarm parameter setting dialog box.
Step 3 setting alarm parameters
1. Add counter
In the alert parameter settings dialog box, click the add button, pop up the add counter dialog box, and then select the "LogicalDisk" option in the performance object drop-down list box.
Select the "check counter from list" option, then select "% Free Space" in the list box, select the drive letter you want to monitor, such as "C:", and finally click the "add" button. (note that alerts should be added separately to monitor multiple disks; select "_ Total" to monitor the entire disk capacity)
two。 Warning parameters and sampling interval
Then go back to the alarm parameter settings dialog box, and then set the trigger warning parameters and data sampling interval parameters. If you want to set the remaining disk space to less than 15%, alert the administrator. In the "will trigger alarm, if the value is" drop-down box, select the "below" option and enter "15" in the "limit" column. Then set the data sampling interval value, this interval time should not be set too short, such as set to "5 minutes", enter "5" in the "interval" column, and select "minutes" in the "units" column.
3. Specify warning action
Finally, switch to the "actions" tab, select the "execute this program" option in the "when an alarm is triggered" box, click Browse, and select "email warning .bat"
Attach an example of "email warning .bat":
[html]
@ echo off
Echo disk is full, please clean it in time! The server address is: > c:\ mail_body.txt
Ipconfig | find "IP Address" > > c:\ mail_body.txt
Parameter settings:
Set from=test@qq.com
Set user=test
Set pass=11111
Set to=alarm@qq.com
Set subj= "Disk Full Alarm!"
Set mail=c:\ mail_body.txt
Set server=smtp.qq.com
Set debug=-debug-log c:\ blat.log-timestamp
: run blat:
Blat% mail%-to% to%-base64-charset Gb2312-subject% subj%-server% server%-f% from%-u% user%-pw% pass%% debug%
Screenshot of email alarm:
After reading the above, have you mastered the specific ideas and operation steps of realizing automatic mail alarm on full disk in windows system? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.