There are times when you want to log off your system, but you want the programs to be executed on the server machine which you've initiated from your system. You can use screen command which serves this purpose. It starts a session within the session that you have logged in. Even if you logout from your system, the screen will keep on running until the server stops or you forcefully exit.
Here are the commands which you should use.
$screen //starts a new session in the logged session
$./a.out > output //some command which you want to get it executed
$ CTRL + a + d //closes the screen and brings you back to the original session
$screen -r //displays the screens running on your machine
Hope this is helpful :-)
Monday, June 28, 2010
View, Start, Stop, Pause, Restart a service in Windows
Hi here I am giving you the commands which you should use them from the command line prompt in windows.
There are many a times when you want to know what are the services running while you have logged in to your computer.
Use this command which display a list of services that are running on your computer:
net start
To start a new service, use:
net start
To stop a running service, use:
net stop
To pause a service, use:
net pause
To restart a service, use:
net continue
Hope this is helpful :-)
There are many a times when you want to know what are the services running while you have logged in to your computer.
Use this command which display a list of services that are running on your computer:
net start
To start a new service, use:
net start
To stop a running service, use:
net stop
To pause a service, use:
net pause
To restart a service, use:
net continue
Hope this is helpful :-)
Saturday, June 19, 2010
Installing gnuplot on windows
You can install gnuplot on windows easily to plot the graphs.
Download gnuplot from this
There is no need to run any exe file but directly copy them to some directory on your system and then make a shortcut to wgnuplot.
It is also useful to install ghostview which allows you to view postscript graphs made with gnuplot. You need gs860w32.exe and gs49w32.exe (or higher?).
Download gnuplot from this
There is no need to run any exe file but directly copy them to some directory on your system and then make a shortcut to wgnuplot.
It is also useful to install ghostview which allows you to view postscript graphs made with gnuplot. You need gs860w32.exe and gs49w32.exe (or higher?).
Instructions for installing ghostview can be found here;
http://pages.cs.wisc.edu/~ghost/gsview/
Friday, June 11, 2010
Identify the ports in linux
For socket programming, you need to use the port. If you want to identify the ports which are active, you can use the following commands. Generally in linux, the ports from 0 to 1023 are reserved and can be accessed only as a root user.
For checking the information about the port, you can use netstat
If you want to know more about this command, you can check its man page
$ man netstat
But for quick reference, you can use any of these for the appropriate purpose.
For finding the open ports:
$ netstat --listen
For finding the open ports and established TCP connections:
$ netstat -vatn
For checking information about a port,
$ netstat -anp | grep <port>
For identifying the ports already in use:
$ netstat -atnp | grep LISTEN
For checking the information about the port, you can use netstat
If you want to know more about this command, you can check its man page
$ man netstat
But for quick reference, you can use any of these for the appropriate purpose.
For finding the open ports:
$ netstat --listen
For finding the open ports and established TCP connections:
$ netstat -vatn
For checking information about a port,
$ netstat -anp | grep <port>
For identifying the ports already in use:
$ netstat -atnp | grep LISTEN
Subscribe to:
Posts (Atom)