Learning with learners
W3LC brings you Discussions For IT People. Stuffed with personal touch & humor by Anwar Jamal Faiz.
A great place to read and participate in IT discussions. With over 3.5 million hits from bright technical minds across the globe, W3LC urges to read, enjoy, and comment. Learning, ofcourse, would just be a side-effect. Also visit MeOnShow. And, Technology Job Puzzles.
Showing posts with label process. Show all posts
Showing posts with label process. Show all posts
Wednesday, March 11, 2020
Thursday, February 17, 2011
Starting process in background in windows using : start /b and start /priority
This information that I am posting came as a surprise to me two years back. And sine one year I have seen its usage groeing in my day to day job at Software Divisions of MNCs. Jokes apart, various automations that I did used the following concept in some way or the other. Sometimes the bat scripts and some times the python scripts.
Actually in Unix/Linux shells and hence in beautiful Mac machines I owned at Adobe Systems, there was an option to start a process in the “background” by (i.e. in bash) typing “./&“, or you may try pressing Ctrl-Z and then “bg“. The process then prints its output to stdout as usual, but the bash runs in the foreground and receives console stdin. The task was easy.
But in Windows, mere calling the exe would not do this job that easily done. But something similar can be done by doing: start /b. This would run the process in the background, and its output is printed to your stdout, even though cmd continues running immediately and receives your stdin. Be warned that if you do “start ” without the “/b” switch, then the process runs in another window, which closes when it exits.
There is yet another switch for “start” is /priority, which I learnt only after joining Symantec Software. In this command the ‘priority’ is the name of a process priority string. For example “start /b /realtime pslist” can be used to get a pslist output that runs in realtime priority.
Actually in Unix/Linux shells and hence in beautiful Mac machines I owned at Adobe Systems, there was an option to start a process in the “background” by (i.e. in bash) typing “./
But in Windows, mere calling the exe would not do this job that easily done. But something similar can be done by doing: start /b
There is yet another switch for “start” is /priority, which I learnt only after joining Symantec Software. In this command the ‘priority’ is the name of a process priority string. For example “start /b /realtime pslist” can be used to get a pslist output that runs in realtime priority.
Using Process Explorer in Windows XP Server Vista and Win7
In Order to know what all processes are running and to forcibly terminate any you need to explore Process explorer. In Windows platform this can come easily by opening Taskbar. Ctrl+Alt+Delete and selecting Taskbar is historically the method to reach there.
You can instead of killing a process, suspend it (right-click on a process to see this option). This is useful in the case if program stuck in an endless loop.
In addition, if you wanna know what is the process identification (term better known as PID historically since the advent of Unix based Systems), then Open the program, then switch to Process Explorer. In the top-right corner there is a target icon (see concentric circles). Clicking this icon and dragging it onto the program you want to see, the Process Explorer will highlight the process.
You can instead of killing a process, suspend it (right-click on a process to see this option). This is useful in the case if program stuck in an endless loop.
In addition, if you wanna know what is the process identification (term better known as PID historically since the advent of Unix based Systems), then Open the program, then switch to Process Explorer. In the top-right corner there is a target icon (see concentric circles). Clicking this icon and dragging it onto the program you want to see, the Process Explorer will highlight the process.
Subscribe to:
Posts (Atom)
