30

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?

3 Answers 3

29

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

  • Ubuntu 14.04, 16.04, and 16.10: /var/log/syslog
  • SLES 11 and 12: /var/log/messages
4
27

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

-1

There are two ways to search for the log file probably a lot more but i know the below.

  1. locate -i startupscript.log - you may need to update your indexes periodically for this option to be optimal.
  2. From root find / -iname startupscript.log -print .
2
  • I actually tried this, but there is no script with that name anymore and I have checked all files showing up through find / -iname *.log -print Mar 14, 2017 at 13:19
  • I read this post about some users missing their /var/log/journal directory after they upgraded which is where their boot log information should be going. Granted they didnt state that they were on a Google Cloud platform so it could be different. Link to Ask Ubuntu Form post
    – Govna
    Mar 14, 2017 at 15:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.