|
From: Petar P. <pet...@gm...> - 2007-03-20 23:25:18
|
Hi, I've tried the following code on both Fedora Core 4 and SUSE 10.2 and it aways returns 0. It works OK on Windows (the process which listens on port 6500 is running on all three machines): Sigar sigar = new Sigar(); sigar.getProcPort( "tcp", Long.toString( 6500 ) ); Any help will be greatly appreciated. What I'm trying to do is check if a given process is running on a given port. Any other way to do that in Java will also help (I need it to work on Linux, Solaris, Windows and AIX). Thanks. |