Have you checked /var/adm/SYSLOG file? It may tell you something.
Then please read man pages of 'vi' and 'ed.'
RGDS, Tadashi Nemoto