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 --script-type 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
curl -sSO https://dl.google.com/cloudagents/install-logging-agent.sh sudo bash install-logging-agent.sh
to the top of the start up script. –
Orji To rerun your startup script, run below command
sudo google_metadata_script_runner startup
To view output of startup script
sudo journalctl -u google-startup-scripts.service
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
.find / -iname *.log -print
–
Undies © 2022 - 2025 — McMap. All rights reserved.
google_metadata_script_runner --script-type startup
– Exstipulate