In Google Cloud Platform's Ubuntu 16.04.1 instance, the output of my startup script was written to /var/log/startupscript.log
.
Since they upgraded to 16.04.02
I can't find the logs anymore.
Any idea?
In Google Cloud Platform's Ubuntu 16.04.1 instance, the output of my startup script was written to /var/log/startupscript.log
.
Since they upgraded to 16.04.02
I can't find the logs anymore.
Any idea?
The correct answer (by now) is to use journalctl:
sudo journalctl -u google-startup-scripts.service
You can re-run a startup script like this:
sudo google_metadata_script_runner startup
See also: https://cloud.google.com/compute/docs/instances/startup-scripts/linux
UPDATE from the official documentation:
Startup script output is written to the following log files:
CentOS and RHEL: /var/log/messages
Debian: /var/log/daemon.log
/var/log/syslog
/var/log/messages
There are two ways to search for the log file probably a lot more but i know the below.
locate -i startupscript.log
- you may need to update your indexes periodically for this option to be optimal.find / -iname startupscript.log -print
.