Amazon EC2 : getting an instance and run a script [closed] - amazon

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I've looked at Amazon EC2 for some basic script I need to run sometimes.
My only issue at the moment is that I've done some test and read some documentation, but I still don't know if it's possible to do a script to get the instance (like rent it) then ssh, upload my script and run it.
From what I've looked it's possible to ssh, scp my script and run it, but I have no idea for the first step.
If someone has an answer or some example, it would be greatly appreciated.
Thank you.
Bdloul

You'll probably want to to start by launching an instance through the wizard by selecting launch instance on your ec2 console (console.aws.amazon.com > ec2).
Then check out the ec2 command line tools. You'll be able to check out instance, check the status of instances, ssh into them, scp up to them, and start your script. Check back when you hit a snag.

Related

CUDA app on amazon EC2 [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 days ago.
Improve this question
I have a GPU application(C# windows app) that runs locally on a desktop that would like to ran on Amazon ECS P2 or G2 that can on the fly spin up instances dumps some output and shuts-down when done.
I have few questions:
- Does this on fly spin-up instances work at all? Both Windows and Linux ?.
- Do I need to log into each spin-up instances and execute the application manually?
- The app needs to read input data and dump output file and I wonder how is this handled on Amazon?
Any good pointers is very much appreciated.
You can install/launch your code at the EC2 startup via custom script, e.g. it can read data or code from S3 under the same account. It's under Configure Instance Details->Advanced Details. I'm sure you can script it using aws cli too.

Monitoring multiple servers [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
I am required to run a couple of batch scripts at frequent intervals on multiple servers. This requires me to log in to each server every time.Is there an easier way to do this?
Thanks in advance.
Use a screen manager such as screen or tmux to keep the sessions alive if you need an interactive session to do your monitoring.
If you just need to poll for data, ssh allows you to pass a command like this
ssh username#hostname 'command'
You can stick this into a bash script and use cron to run it regularly.
Install a cron job at these servers. Then, it depends on the servers and infrastructure how you can access the output, if you need it.

Command Logs Ubuntu [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Is there anyway that i can log all the commands that a certain user or user group has run in an ubuntu CLI.
I need to keep a track of all the commands run by a certain group of users say
UsrGrp1:usr1,usr2,usr3
as i'm running a Cluster of machines and all are being controlled by different users. And i need to monitor those through the root user of every machine.
The history command gives me all the command logs. But it can be modified by the user itself. So i need to keep the logs under the root user only.
You can try logkeys a keylogger for linux. Another options could be script but with this you need to write a trigger to start it at each user login.

Install script needs to set up a program to run on login in Linux [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
I need to write an install script that runs an executable/script on login (not startup) in Linux. This needs to work for all current users who can log into the system and users created in the future as well. Is there a way to do this?
In windows this can be achieved by putting a shortcut in the startup folder for "All Users". Is there a similar location/init script in Linux? If not, are there any alternatives?
Thanks in Advance!
The users ~/.bash_profile or ~/.profile depending on shell is executed at login. You can add to that. If you want it for every user, you could put it in /etc/profile.

Login to SSH twice at the same time [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 12 years ago.
Improve this question
Is there any way to setup my SSH client or my GNOME terminal or whatver so that when I SSH into a remote server it opens up TWO connections (or tabs or whatever)?
I always like to have two SSH connections to my remote servers open - one for displaying log files and another to do actual work. It bugs me that I have to login twice everytime.
Possible? Sensible? What's the verdict?!
I'm not sure what you're trying to accomplish. If you only have one terminal open, where would the two connection send output and get input? You might find something like "screen" useful that lets you have multiple virtual terminals that display to a single physical terminal. You use a key sequence to switch between them. I use it all the time when working over a remote login to a Unix box. It's also nice because you can re-attach to your virtual terminals if you lose your connection.

Resources