i using ps (specifically psutil python library) see list of running processes on linux machine. want deterimine processes running go applications (that is, running go code).
below ps output process written in go. there indicates running go code?
{'cmdline': ['./samplemeplz'], 'connections': [connection(fd=3, family=10, type=1, laddr=('::', 8080), raddr=(), status='listen')], 'cpu_affinity': [0, 1, 2, 3], 'cpu_percent': 0.0, 'cpu_times': cputimes(user=0.0, system=0.0), 'create_time': 1436474176.89, 'cwd': '/home/ben/gocode/src/samplemeplz', 'exe': '/home/ben/gocode/src/samplemeplz/samplemeplz', 'ext_memory_info': meminfo(rss=4071424, vms=192684032, shared=3092480, text=3096576, lib=0, data=179523584, dirty=0), 'gids': group(real=5000, effective=5000, saved=5000), 'io_counters': io(read_count=12, write_count=0, read_bytes=4096, write_bytes=0), 'ionice': ionice(ioclass=0, value=4), 'memory_info': meminfo(rss=4071424, vms=192684032), 'memory_maps': [mmap(path='/lib/x86_64-linux-gnu/libpthread-2.15.so', rss=65536, size=2199552, pss=8192, shared_clean=57344, shared_dirty=0, private_clean=0, private_dirty=8192, referenced=65536, anonymous=8192, swap=0), mmap(path='/lib/x86_64-linux-gnu/libc-2.15.so', rss=311296, size=3903488, pss=26624, shared_clean=286720, shared_dirty=0, private_clean=0, private_dirty=24576, referenced=311296, anonymous=24576, swap=0), mmap(path='[stack]', rss=8192, size=139264, pss=8192, shared_clean=0, shared_dirty=0, private_clean=0, private_dirty=8192, referenced=8192, anonymous=8192, swap=0), mmap(path='[anon]', rss=946176, size=179245056, pss=946176, shared_clean=0, shared_dirty=0, private_clean=0, private_dirty=946176, referenced=946176, anonymous=946176, swap=0), mmap(path='/lib/x86_64-linux-gnu/ld-2.15.so', rss=122880, size=151552, pss=13312, shared_clean=110592, shared_dirty=0, private_clean=0, private_dirty=12288, referenced=122880, anonymous=12288, swap=0), mmap(path='[vsyscall]', rss=0, size=4096, pss=0, shared_clean=0, shared_dirty=0, private_clean=0, private_dirty=0, referenced=0, anonymous=0, swap=0), mmap(path='[heap]', rss=4096, size=135168, pss=4096, shared_clean=0, shared_dirty=0, private_clean=0, private_dirty=4096, referenced=4096, anonymous=4096, swap=0), mmap(path='[vdso]', rss=4096, size=4096, pss=0, shared_clean=4096, shared_dirty=0, private_clean=0, private_dirty=0, referenced=4096, anonymous=0, swap=0), mmap(path='/home/ben/gocode/src/samplemeplz/samplemeplz', rss=2908160, size=6905856, pss=2908160, shared_clean=0, shared_dirty=0, private_clean=2879488, private_dirty=28672, referenced=2908160, anonymous=28672, swap=0)], 'memory_percent': 0.025919821179310142, 'name': 'samplemeplz', 'nice': 0, 'num_ctx_switches': amount(voluntary=15, involuntary=18), 'num_fds': 5, 'num_threads': 6, 'open_files': [], 'pid': 111252, 'ppid': 42061, 'status': 'sleeping', 'terminal': '/dev/pts/9', 'threads': [thread(id=111252, user_time=0.0, system_time=0.0), thread(id=111253, user_time=0.0, system_time=0.0), thread(id=111254, user_time=0.0, system_time=0.0), thread(id=113972, user_time=0.0, system_time=0.0), thread(id=113973, user_time=0.0, system_time=0.0), thread(id=113974, user_time=0.0, system_time=0.0)], 'uids': user(real=3008, effective=3008, saved=3008), 'username': 'ben'}
the short answer no. code compiled leaving no information language/compiler produced it. can symptoms of go-program, references gopath or sub directories of it, not more.
Comments
Post a Comment