Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm very new to Ec2. And I wrote a set of shell scripts and run over ec2 instance :

ec2-run-instances ami-82fa58eb -d Setup.sh

I just get the following output :

RESERVATION r-ed405088  980691203742    default
INSTANCE    i-7eb12d06  ami-82fa58eb            pending     0       m1.small    2012-07-13T08:15:25+0000    us-east-1a  aki-825ea7eb        monitoring-disabled                 ebs                 paravirtual xen     sg-ff369697 default

How come I know that my shell script have been successfully executed?

share|improve this question
    
Shouldn't you know it's been successfully executed because whatever you wanted to the shell script to do has been done? –  womble Jul 13 '12 at 9:19
    
@womble: Thats what the problem is. In my script I did installing auditd package. And logged all the info into /tmp/install.log. Now how can I know that it got install? How can I open the /tmp/install.log file? –  karti Jul 13 '12 at 9:25
    
You could look to see if the auditd package is installed. –  womble Jul 13 '12 at 9:34
    
Sorry again, I'm new to ec2. How come I see that? Thats my question. –  karti Jul 13 '12 at 9:39
    
That's not an EC2 thing, that's a "Sysadmin 101" thing. Reading the docs for your package manager (whatever that may be) would probably be a good first step. –  womble Jul 13 '12 at 9:40
show 10 more comments

1 Answer

up vote 0 down vote accepted

You can make the shell script create a log file, log into syslog with logger command, send an e-mail to yourself, use Amazon SNS or notify you in some other way.

I think the output of user data shell scripts is not stored anywhere.

I found this blog post useful for learning how to utilize user data for customizing a new instance when setting it up.

share|improve this answer
    
I have logged all the things into /tmp/install.log file. Is there any way to see that file in ec2 instance? –  karti Jul 13 '12 at 9:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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