get notification when mac turns on/powers up

stuartrozier

macrumors regular
Original poster
Nov 12, 2011
249
5
hello,

im wondering if anyone knows of any apps out there that notify you either by txt or email when a mac is powered up,
ive got my mac set so it doesn't log in automatically, but im intrigued to know who in my house is trying to access my mac when im not there,

was thinking just a simple app or script that'll run in the background to notify when its been powered up,

thanks in advance,

Stuart
 

barbu

macrumors 6502a
Jul 8, 2013
513
586
wpg.mb.ca
a launchd script in the /Library/LaunchAgents folder would probably do the trick. You could have the script POST to a remote website with curl or something (hundreds of options) to indicate power on. Depends on your ability. Maybe someone knows of an even simpler way.
 
  • Like
Reactions: stuartrozier

MacUser2525

macrumors 68000
Mar 17, 2007
1,947
290
Canada
hello,

im wondering if anyone knows of any apps out there that notify you either by txt or email when a mac is powered up,
ive got my mac set so it doesn't log in automatically, but im intrigued to know who in my house is trying to access my mac when im not there,

was thinking just a simple app or script that'll run in the background to notify when its been powered up,

thanks in advance,

Stuart
I am thinking one of the logs accessed in the console app will tell the time it was started up. But if your that concerned a security camera may be a better idea...
 
  • Like
Reactions: stuartrozier

BrianBaughn

macrumors 604
Feb 13, 2011
6,539
1,028
Baltimore, Maryland
If your Mac logs into your account automatically you could add a reasonably complicated, automatically running script that could achieve this. Or, you could just add an Automator application that opens Mail and sends a message.

If auto login isn't on then I wouldn't have any ideas.
 

Erehy Dobon

macrumors 6502a
Feb 16, 2018
539
384
I am thinking one of the logs accessed in the console app will tell the time it was started up. But if your that concerned a security camera may be a better idea...
The system log would tell you what time the system booted up or shut down. It can't tell you who physically did it (wife, child, cat, housekeeper), especially if no one logged in.

Here's the UNIX command (from Terminal) to see when a system booted:

grep BOOT_TIME /var/log/system.log

The corresponding UNIX command for shutdown is:

grep SHUTDOWN_TIME /var/log/system.log

You can search for these in the Console app (in the Utilities folder) as well (you need to select system.log in the left menu pane).

You can also use the Terminal 'w' or 'uptime' commands to see how long the machine has been running.
 

stuartrozier

macrumors regular
Original poster
Nov 12, 2011
249
5
The system log would tell you what time the system booted up or shut down. It can't tell you who physically did it (wife, child, cat, housekeeper), especially if no one logged in.

Here's the UNIX command (from Terminal) to see when a system booted:

grep BOOT_TIME /var/log/system.log

The corresponding UNIX command for shutdown is:

grep SHUTDOWN_TIME /var/log/system.log

You can search for these in the Console app (in the Utilities folder) as well (you need to select system.log in the left menu pane).

You can also use the Terminal 'w' or 'uptime' commands to see how long the machine has been running.
yeah hats true, but i have cctv in my office, so atlas when im out of the house an i know my mac has been switched on, i can log into my remote cctv and see who's using it, i think i found a script to email me when it boots up which will notify when it starts up, fingers crossed, thankyou again
- - Post merged: - -

If your Mac logs into your account automatically you could add a reasonably complicated, automatically running script that could achieve this. Or, you could just add an Automator application that opens Mail and sends a message.

If auto login isn't on then I wouldn't have any ideas.
i googled an searched for this option an got it working a treat, was simple, easy, and just runs on a process int he background, thankyou