Multiple Open Ports for Opmantek applications

Just a simple page to say that if you notice quite a few tcp ports open on your Linux machine (using netstat or similar), this is expected behavior.

These ports listen on localhost only, hence are not able to be connected to from another machine.

Opmantek applications fork a number of processes as required, up to a maximum specified in the config file /usr/local/omk/conf/.opCommon.json under the attribute omkd_workers.

Each of these processes spawns threads as required, up to a maximum of (by default) 1,000. This is also controllable by the attribute omkd_max_requests, which is also in the same config file as above.

This is expected and normal behavior. If you think about it, Apache works in a similar fashion.

Example command outputs are below.

Netstat

root@ubu20:/usr/local/omk/script# netstat -ap | grep -i listen | grep opman
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name 
tcp        0      0 0.0.0.0:8042            0.0.0.0:*               LISTEN      1282617/opmantek.pl 
tcp        0      0 localhost:46509         0.0.0.0:*               LISTEN      1282645/opmantek.pl 
tcp        0      0 localhost:41133         0.0.0.0:*               LISTEN      1282647/opmantek.pl 
tcp        0      0 localhost:40849         0.0.0.0:*               LISTEN      1282646/opmantek.pl 
tcp        0      0 localhost:42745         0.0.0.0:*               LISTEN      1282648/opmantek.pl 
tcp        0      0 localhost:41921         0.0.0.0:*               LISTEN      1282646/opmantek.pl 
tcp        0      0 localhost:40993         0.0.0.0:*               LISTEN      1282648/opmantek.pl 
tcp        0      0 localhost:44517         0.0.0.0:*               LISTEN      1282645/opmantek.pl 
tcp        0      0 localhost:39241         0.0.0.0:*               LISTEN      1282647/opmantek.pl 

Process List

root@ubu20:/usr/local/omk/script# ps -ef | grep opman | grep -v grep
UID          PID    PPID  C STIME TTY          TIME CMD
root     1282617       1  0 23:46 ?        00:00:01 opmantek.pl-webserver -f -p /var/run/opmantek.exe.pid -r
root     1282644 1282617  0 23:46 ?        00:00:00 opmantek.pl-webserver -f -p /var/run/opmantek.exe.pid -r
root     1282645 1282617  0 23:46 ?        00:00:00 opmantek.pl-webserver -f -p /var/run/opmantek.exe.pid -r
root     1282646 1282617  0 23:46 ?        00:00:00 opmantek.pl-webserver -f -p /var/run/opmantek.exe.pid -r
root     1282647 1282617  0 23:46 ?        00:00:00 opmantek.pl-webserver -f -p /var/run/opmantek.exe.pid -r
root     1282648 1282617  0 23:46 ?        00:00:00 opmantek.pl-webserver -f -p /var/run/opmantek.exe.pid -r