this is a pc Monitor program which can be used to report the start info through email and you can shutdown your pc by reply the report-mail
Python Shell
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


three documents:


if you want to receive [pc start] msg, put the file into /Library/LaunchDaemons/. other way,to put this file into /Library/LaunchAgents so that you can receive the msg to kown someone has logined into your system.


put the shell script file into /usr/local/, and give other user execute permission in the terminal with below cmd: sudo chmod o+x /usr/local/


it's the program logic that will be executed actually. like, you should put this gay into /usr/local/. and you should modify somewhere which I havd marked as "#TODO", mostly they are about the e-mail.

ok,now you should give the user which you want monitor more permission, such as, shutdown. yeah, shutdown! I konw it seems to be very dangerous, but you must do that, if you want it looks like fascinating! first,modified shutdown shell sudo vi /sbin/shutdown then change the line contain: %users localhost=/sbin/shutdown -h now to (remove the first sharp symbol): %yanghua localhost=/sbin/shutdown -h now notice:yanghua is just my pc's user name

set the suid for the user of the pc that you want to monitor in the Treminal: sudo chmod u+s /sbin/shutdown

Modify info

added screen shot when the network is unable and handled method:"init" exception at Fri Feb 8.

More info

more information, please go and see my blog:

and if you have any problem, give me your mail:

Have fun!