Tag: running


How to determine whether specific processes are running or not

Let’s see how we can check if specific processes are already running in the system and then decide what we would like to do (exit for example). Useful links CreateToolhelp32Snapshot Process32First Process32Next //.. static char* const ProcessesNotAllowed[] = { "blahblah1", "blahblah2" }; //.. void CheckIfProcsRunning() { PROCESSENTRY32 pe; HANDLE h; int i = 0; int …


List all running processes in Java

Tasklist displays a list of applications and services with their Process ID (PID) for all tasks running on either a local or a remote computer. void ListAllProcesses() { try { Process p = Runtime.getRuntime().exec("tasklist"); BufferedReader reader = new BufferedReader( new InputStreamReader(p.getInputStream())); String line; while ((line = reader.readLine()) != null) { System.out.println(line); } } catch (Exception …

Macintosh, Virtualization

Installing VirtualBox on Mac OS X 10.5.8

Download latest VirtualBox from here. Follow the instructions of the installer. If you are getting the following error: “Running VirtualBox VM’s detected! The installer has detected running Virtual Machines.” Then download and install a previous build of VirtualBox. It will work! For older builds of VirtualBox see here.


Inspect network connections with netstat

List network connections, open ports and the programs running behind those ports with netstat. Open a terminal and type: netstat -apenetstat -ape -a, –all, –listening display all sockets (default: connected) -p, –programs display PID/Program name for sockets -e, –extend display other/more information Output: Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name …