From 832cd452399861334a0cf2df9056503031ce4a5f Mon Sep 17 00:00:00 2001 From: Cole Deck Date: Tue, 11 Oct 2022 20:04:45 -0500 Subject: [PATCH] fix hostname output on linux --- ippigeon.py | 2 +- netstat.py | 1 + output.log | 614 ++++++++++++++++++++++++++++++++++++++++++++++++++++ util.py | 5 +- 4 files changed, 619 insertions(+), 3 deletions(-) diff --git a/ippigeon.py b/ippigeon.py index ffe6319..15d3100 100644 --- a/ippigeon.py +++ b/ippigeon.py @@ -48,7 +48,7 @@ if linux: datafile += "gendata.csv" res = subprocess.check_output(["who",], universal_newlines=True) userid = res.strip().split(" ")[0] - sysdom = subprocess.check_output(["hostname",], universal_newlines=True) + sysdom = subprocess.check_output(["hostname",], universal_newlines=True).strip() #fprint(hostname) def netstat_done(res): diff --git a/netstat.py b/netstat.py index c18d6ca..b13220e 100644 --- a/netstat.py +++ b/netstat.py @@ -77,6 +77,7 @@ def process(data): fprint("Not enough permissions") raise PermissionError("Unable to acquire netstat data without admin!") output2 = list() + output2.append([util.sysid, util.userid, util.sysdom, util.time()]) # add metadata for line in output: string_split = line.split(" ") string_split = [i for i in string_split if i] diff --git a/output.log b/output.log index 8183dfd..4c294ff 100644 --- a/output.log +++ b/output.log @@ -85317,3 +85317,617 @@ Traceback (most recent call last): File "/usr/lib/python3.10/multiprocessing/pool.py", line 675, in _help_stuff_finish inqueue._rlock.acquire() KeyboardInterrupt +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 163, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 107, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt +[__main__:process_done]: uploading to sftp... +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 163, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 107, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt +[__main__:netstat_done]: netstat done, processing +[__main__:process_done]: uploading to sftp... +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 163, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 107, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt +[__main__:mainloop]: netstat starting +[__main__:netstat_done]: netstat done, processing +[__main__:process_done]: uploading to sftp... +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 163, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 107, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt +[__main__:mainloop]: start loop +[__main__:mainloop]: netstat starting +[__main__:netstat_done]: netstat done, processing +[__main__:process_done]: uploading to sftp... +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 163, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 107, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt +[__main__:mainloop]: start loop +[__main__:mainloop]: netstat starting +[__main__:netstat_done]: netstat done, processing +[__main__:process_done]: uploading to sftp... +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 163, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 107, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 165, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 109, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 139, in + with Pool(processes=5) as pool: + File "/usr/lib/python3.10/multiprocessing/pool.py", line 739, in __exit__ + self.terminate() + File "/usr/lib/python3.10/multiprocessing/pool.py", line 657, in terminate + self._terminate() + File "/usr/lib/python3.10/multiprocessing/util.py", line 224, in __call__ + res = self._callback(*self._args, **self._kwargs) + File "/usr/lib/python3.10/multiprocessing/pool.py", line 695, in _terminate_pool + cls._help_stuff_finish(inqueue, task_handler, len(pool)) + File "/usr/lib/python3.10/multiprocessing/pool.py", line 675, in _help_stuff_finish + inqueue._rlock.acquire() +KeyboardInterrupt +[__main__:process_done]: uploading to sftp... +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 165, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 109, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 139, in + with Pool(processes=5) as pool: + File "/usr/lib/python3.10/multiprocessing/pool.py", line 739, in __exit__ + self.terminate() + File "/usr/lib/python3.10/multiprocessing/pool.py", line 657, in terminate + self._terminate() + File "/usr/lib/python3.10/multiprocessing/util.py", line 224, in __call__ + res = self._callback(*self._args, **self._kwargs) + File "/usr/lib/python3.10/multiprocessing/pool.py", line 695, in _terminate_pool + cls._help_stuff_finish(inqueue, task_handler, len(pool)) + File "/usr/lib/python3.10/multiprocessing/pool.py", line 675, in _help_stuff_finish + inqueue._rlock.acquire() +KeyboardInterrupt +[__main__:netstat_done]: netstat done, processing +[__main__:process_done]: uploading to sftp... +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 165, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 109, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 139, in + with Pool(processes=5) as pool: + File "/usr/lib/python3.10/multiprocessing/pool.py", line 739, in __exit__ + self.terminate() + File "/usr/lib/python3.10/multiprocessing/pool.py", line 657, in terminate + self._terminate() + File "/usr/lib/python3.10/multiprocessing/util.py", line 224, in __call__ + res = self._callback(*self._args, **self._kwargs) + File "/usr/lib/python3.10/multiprocessing/pool.py", line 695, in _terminate_pool + cls._help_stuff_finish(inqueue, task_handler, len(pool)) + File "/usr/lib/python3.10/multiprocessing/pool.py", line 675, in _help_stuff_finish + inqueue._rlock.acquire() +KeyboardInterrupt +[__main__:mainloop]: netstat starting +[__main__:netstat_done]: netstat done, processing +[__main__:process_done]: uploading to sftp... +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 165, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 109, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 139, in + with Pool(processes=5) as pool: + File "/usr/lib/python3.10/multiprocessing/pool.py", line 739, in __exit__ + self.terminate() + File "/usr/lib/python3.10/multiprocessing/pool.py", line 657, in terminate + self._terminate() + File "/usr/lib/python3.10/multiprocessing/util.py", line 224, in __call__ + res = self._callback(*self._args, **self._kwargs) + File "/usr/lib/python3.10/multiprocessing/pool.py", line 695, in _terminate_pool + cls._help_stuff_finish(inqueue, task_handler, len(pool)) + File "/usr/lib/python3.10/multiprocessing/pool.py", line 675, in _help_stuff_finish + inqueue._rlock.acquire() +KeyboardInterrupt +[__main__:mainloop]: start loop +[__main__:mainloop]: netstat starting +[__main__:netstat_done]: netstat done, processing +[__main__:process_done]: uploading to sftp... +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 165, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 109, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 139, in + with Pool(processes=5) as pool: + File "/usr/lib/python3.10/multiprocessing/pool.py", line 739, in __exit__ + self.terminate() + File "/usr/lib/python3.10/multiprocessing/pool.py", line 657, in terminate + self._terminate() + File "/usr/lib/python3.10/multiprocessing/util.py", line 224, in __call__ + res = self._callback(*self._args, **self._kwargs) + File "/usr/lib/python3.10/multiprocessing/pool.py", line 695, in _terminate_pool + cls._help_stuff_finish(inqueue, task_handler, len(pool)) + File "/usr/lib/python3.10/multiprocessing/pool.py", line 675, in _help_stuff_finish + inqueue._rlock.acquire() +KeyboardInterrupt +[__main__:mainloop]: start loop +[__main__:mainloop]: netstat starting +[__main__:netstat_done]: netstat done, processing +[__main__:process_done]: uploading to sftp... +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 165, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 109, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 139, in + with Pool(processes=5) as pool: + File "/usr/lib/python3.10/multiprocessing/pool.py", line 739, in __exit__ + self.terminate() + File "/usr/lib/python3.10/multiprocessing/pool.py", line 657, in terminate + self._terminate() + File "/usr/lib/python3.10/multiprocessing/util.py", line 224, in __call__ + res = self._callback(*self._args, **self._kwargs) + File "/usr/lib/python3.10/multiprocessing/pool.py", line 695, in _terminate_pool + cls._help_stuff_finish(inqueue, task_handler, len(pool)) + File "/usr/lib/python3.10/multiprocessing/pool.py", line 675, in _help_stuff_finish + inqueue._rlock.acquire() +KeyboardInterrupt +[__main__:]: d +[__main__:mainloop]: start loop +[__main__:mainloop]: netstat starting +[__main__:netstat_done]: netstat done, processing +[__main__:process_done]: uploading to sftp... +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 165, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 109, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 139, in + with Pool(processes=5) as pool: + File "/usr/lib/python3.10/multiprocessing/pool.py", line 739, in __exit__ + self.terminate() + File "/usr/lib/python3.10/multiprocessing/pool.py", line 657, in terminate + self._terminate() + File "/usr/lib/python3.10/multiprocessing/util.py", line 224, in __call__ + res = self._callback(*self._args, **self._kwargs) + File "/usr/lib/python3.10/multiprocessing/pool.py", line 695, in _terminate_pool + cls._help_stuff_finish(inqueue, task_handler, len(pool)) + File "/usr/lib/python3.10/multiprocessing/pool.py", line 675, in _help_stuff_finish + inqueue._rlock.acquire() +KeyboardInterrupt +[__main__:]: 0xf44ee3942e79 +[__main__:]: d +[__main__:mainloop]: start loop +[__main__:mainloop]: netstat starting +[__main__:netstat_done]: netstat done, processing +[__main__:process_done]: uploading to sftp... +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 165, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 109, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 139, in + with Pool(processes=5) as pool: + File "/usr/lib/python3.10/multiprocessing/pool.py", line 739, in __exit__ + self.terminate() + File "/usr/lib/python3.10/multiprocessing/pool.py", line 657, in terminate + self._terminate() + File "/usr/lib/python3.10/multiprocessing/util.py", line 224, in __call__ + res = self._callback(*self._args, **self._kwargs) + File "/usr/lib/python3.10/multiprocessing/pool.py", line 695, in _terminate_pool + cls._help_stuff_finish(inqueue, task_handler, len(pool)) + File "/usr/lib/python3.10/multiprocessing/pool.py", line 675, in _help_stuff_finish + inqueue._rlock.acquire() +KeyboardInterrupt +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 165, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 109, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt +[__main__:process_done]: uploading to sftp... +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 165, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 109, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt +[__main__:netstat_done]: netstat done, processing +[__main__:process_done]: uploading to sftp... +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 165, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 109, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt +[__main__:mainloop]: netstat starting +[__main__:netstat_done]: netstat done, processing +[__main__:process_done]: uploading to sftp... +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 165, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 109, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt +[__main__:mainloop]: start loop +[__main__:mainloop]: netstat starting +[__main__:netstat_done]: netstat done, processing +[__main__:process_done]: uploading to sftp... +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 165, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 109, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt +[__main__:mainloop]: start loop +[__main__:mainloop]: netstat starting +[__main__:netstat_done]: netstat done, processing +[__main__:process_done]: uploading to sftp... +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 165, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 109, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt +[__main__:]: d +[__main__:mainloop]: start loop +[__main__:mainloop]: netstat starting +[__main__:netstat_done]: netstat done, processing +[__main__:process_done]: uploading to sftp... +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 165, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 109, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt +[__main__:]: framework +[__main__:]: d +[__main__:mainloop]: start loop +[__main__:mainloop]: netstat starting +[__main__:netstat_done]: netstat done, processing +[__main__:process_done]: uploading to sftp... +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 165, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 109, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 165, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 109, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt +[__main__:process_done]: uploading to sftp... +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 165, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 109, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt +[__main__:netstat_done]: netstat done, processing +[__main__:process_done]: uploading to sftp... +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 165, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 109, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt +[__main__:mainloop]: netstat starting +[__main__:netstat_done]: netstat done, processing +[__main__:process_done]: uploading to sftp... +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 165, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 109, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt +[__main__:mainloop]: start loop +[__main__:mainloop]: netstat starting +[__main__:netstat_done]: netstat done, processing +[__main__:process_done]: uploading to sftp... +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 165, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 109, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt +[__main__:mainloop]: start loop +[__main__:mainloop]: netstat starting +[__main__:netstat_done]: netstat done, processing +[__main__:process_done]: uploading to sftp... +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 165, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 109, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt +[__main__:]: d +[__main__:mainloop]: start loop +[__main__:mainloop]: netstat starting +[__main__:netstat_done]: netstat done, processing +[__main__:process_done]: uploading to sftp... +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 165, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 109, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt +[__main__:]: ramewor +[__main__:]: d +[__main__:mainloop]: start loop +[__main__:mainloop]: netstat starting +[__main__:netstat_done]: netstat done, processing +[__main__:process_done]: uploading to sftp... +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 165, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 109, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 165, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 109, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 139, in + with Pool(processes=5) as pool: + File "/usr/lib/python3.10/multiprocessing/pool.py", line 739, in __exit__ + self.terminate() + File "/usr/lib/python3.10/multiprocessing/pool.py", line 657, in terminate + self._terminate() + File "/usr/lib/python3.10/multiprocessing/util.py", line 224, in __call__ + res = self._callback(*self._args, **self._kwargs) + File "/usr/lib/python3.10/multiprocessing/pool.py", line 695, in _terminate_pool + cls._help_stuff_finish(inqueue, task_handler, len(pool)) + File "/usr/lib/python3.10/multiprocessing/pool.py", line 675, in _help_stuff_finish + inqueue._rlock.acquire() +KeyboardInterrupt +[__main__:process_done]: uploading to sftp... +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 165, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 109, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 139, in + with Pool(processes=5) as pool: + File "/usr/lib/python3.10/multiprocessing/pool.py", line 739, in __exit__ + self.terminate() + File "/usr/lib/python3.10/multiprocessing/pool.py", line 657, in terminate + self._terminate() + File "/usr/lib/python3.10/multiprocessing/util.py", line 224, in __call__ + res = self._callback(*self._args, **self._kwargs) + File "/usr/lib/python3.10/multiprocessing/pool.py", line 695, in _terminate_pool + cls._help_stuff_finish(inqueue, task_handler, len(pool)) + File "/usr/lib/python3.10/multiprocessing/pool.py", line 675, in _help_stuff_finish + inqueue._rlock.acquire() +KeyboardInterrupt +[__main__:netstat_done]: netstat done, processing +[__main__:process_done]: uploading to sftp... +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 165, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 109, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 139, in + with Pool(processes=5) as pool: + File "/usr/lib/python3.10/multiprocessing/pool.py", line 739, in __exit__ + self.terminate() + File "/usr/lib/python3.10/multiprocessing/pool.py", line 657, in terminate + self._terminate() + File "/usr/lib/python3.10/multiprocessing/util.py", line 224, in __call__ + res = self._callback(*self._args, **self._kwargs) + File "/usr/lib/python3.10/multiprocessing/pool.py", line 695, in _terminate_pool + cls._help_stuff_finish(inqueue, task_handler, len(pool)) + File "/usr/lib/python3.10/multiprocessing/pool.py", line 675, in _help_stuff_finish + inqueue._rlock.acquire() +KeyboardInterrupt +[__main__:mainloop]: netstat starting +[__main__:netstat_done]: netstat done, processing +[__main__:process_done]: uploading to sftp... +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 165, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 109, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 139, in + with Pool(processes=5) as pool: + File "/usr/lib/python3.10/multiprocessing/pool.py", line 739, in __exit__ + self.terminate() + File "/usr/lib/python3.10/multiprocessing/pool.py", line 657, in terminate + self._terminate() + File "/usr/lib/python3.10/multiprocessing/util.py", line 224, in __call__ + res = self._callback(*self._args, **self._kwargs) + File "/usr/lib/python3.10/multiprocessing/pool.py", line 695, in _terminate_pool + cls._help_stuff_finish(inqueue, task_handler, len(pool)) + File "/usr/lib/python3.10/multiprocessing/pool.py", line 675, in _help_stuff_finish + inqueue._rlock.acquire() +KeyboardInterrupt +[__main__:mainloop]: start loop +[__main__:mainloop]: netstat starting +[__main__:netstat_done]: netstat done, processing +[__main__:process_done]: uploading to sftp... +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 165, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 109, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 139, in + with Pool(processes=5) as pool: + File "/usr/lib/python3.10/multiprocessing/pool.py", line 739, in __exit__ + self.terminate() + File "/usr/lib/python3.10/multiprocessing/pool.py", line 657, in terminate + self._terminate() + File "/usr/lib/python3.10/multiprocessing/util.py", line 224, in __call__ + res = self._callback(*self._args, **self._kwargs) + File "/usr/lib/python3.10/multiprocessing/pool.py", line 695, in _terminate_pool + cls._help_stuff_finish(inqueue, task_handler, len(pool)) + File "/usr/lib/python3.10/multiprocessing/pool.py", line 675, in _help_stuff_finish + inqueue._rlock.acquire() +KeyboardInterrupt +[__main__:mainloop]: start loop +[__main__:mainloop]: netstat starting +[__main__:netstat_done]: netstat done, processing +[__main__:process_done]: uploading to sftp... +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 165, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 109, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 139, in + with Pool(processes=5) as pool: + File "/usr/lib/python3.10/multiprocessing/pool.py", line 739, in __exit__ + self.terminate() + File "/usr/lib/python3.10/multiprocessing/pool.py", line 657, in terminate + self._terminate() + File "/usr/lib/python3.10/multiprocessing/util.py", line 224, in __call__ + res = self._callback(*self._args, **self._kwargs) + File "/usr/lib/python3.10/multiprocessing/pool.py", line 695, in _terminate_pool + cls._help_stuff_finish(inqueue, task_handler, len(pool)) + File "/usr/lib/python3.10/multiprocessing/pool.py", line 675, in _help_stuff_finish + inqueue._rlock.acquire() +KeyboardInterrupt +[__main__:]: d +[__main__:mainloop]: start loop +[__main__:mainloop]: netstat starting +[__main__:netstat_done]: netstat done, processing +[__main__:process_done]: uploading to sftp... +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 165, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 109, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 139, in + with Pool(processes=5) as pool: + File "/usr/lib/python3.10/multiprocessing/pool.py", line 739, in __exit__ + self.terminate() + File "/usr/lib/python3.10/multiprocessing/pool.py", line 657, in terminate + self._terminate() + File "/usr/lib/python3.10/multiprocessing/util.py", line 224, in __call__ + res = self._callback(*self._args, **self._kwargs) + File "/usr/lib/python3.10/multiprocessing/pool.py", line 695, in _terminate_pool + cls._help_stuff_finish(inqueue, task_handler, len(pool)) + File "/usr/lib/python3.10/multiprocessing/pool.py", line 675, in _help_stuff_finish + inqueue._rlock.acquire() +KeyboardInterrupt +[__main__:]: framework +[__main__:]: d +[__main__:mainloop]: start loop +[__main__:mainloop]: netstat starting +[__main__:netstat_done]: netstat done, processing +[__main__:process_done]: uploading to sftp... +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 165, in + mainloop(pool) + File "/home/cole/ff/ippigeon.py", line 109, in mainloop + sleep(interval / (interval * 20.0)) +KeyboardInterrupt + +During handling of the above exception, another exception occurred: + +Traceback (most recent call last): + File "/home/cole/ff/ippigeon.py", line 139, in + with Pool(processes=5) as pool: + File "/usr/lib/python3.10/multiprocessing/pool.py", line 739, in __exit__ + self.terminate() + File "/usr/lib/python3.10/multiprocessing/pool.py", line 657, in terminate + self._terminate() + File "/usr/lib/python3.10/multiprocessing/util.py", line 224, in __call__ + res = self._callback(*self._args, **self._kwargs) + File "/usr/lib/python3.10/multiprocessing/pool.py", line 695, in _terminate_pool + cls._help_stuff_finish(inqueue, task_handler, len(pool)) + File "/usr/lib/python3.10/multiprocessing/pool.py", line 675, in _help_stuff_finish + inqueue._rlock.acquire() +KeyboardInterrupt diff --git a/util.py b/util.py index 0612c44..3331c24 100644 --- a/util.py +++ b/util.py @@ -32,8 +32,9 @@ if linux: datafile += "gendata.csv" res = subprocess.check_output(["who",], universal_newlines=True) userid = res.strip().split(" ")[0] - sysdom = subprocess.check_output(["hostname",], universal_newlines=True) - #fprint(hostname) + sysdom = subprocess.check_output(["hostname",], universal_newlines=True).strip() + #fprint(sysdom) + #fprint("d") def time(): return int(t.time())