Skip to content

@sargas
sargas / gist:097b47f98bc99715506b
Last active August 29, 2015 14:09
psutil astropy
diff --git a/astropy/tests/pytest_plugins.py b/astropy/tests/pytest_plugins.py
index 34aa6bd..e4841f9 100644
--- a/astropy/tests/pytest_plugins.py
+++ b/astropy/tests/pytest_plugins.py
@@ -401,33 +401,18 @@ SUPPORTS_OPEN_FILE_DETECTION = (
def _get_open_file_list():
- fsencoding = sys.getfilesystemencoding()
-
@Cykooz
Cykooz / gist:5a5a7d1c3d78017fcefb6769fde811b1
Created September 8, 2017 06:18
psutil - RecursionError
cykooz@cykooz-nb:~/Work/backend$ ./bin/python
Python 3.6.2 (default, Jul 20 2017, 08:43:29)
[GCC 5.4.1 20170519] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> from raven.base import DummyClient
>>> import psutil
>>>
>>> client = DummyClient()
>>> client.is_enabled = lambda: True
@frdfm
frdfm / psutil.py
Last active December 6, 2018 19:17
Using psutil
import psutil
p1 = psutil.Process(1)
p1_dict = p1.as_dict()
print p1_dict["name"]
print p1_dict["exe"]
print p1_dict["cmdline"]
@ondrej-fabry
ondrej-fabry / psutil.go
Created February 12, 2020 12:00
sample psutil
func monitor() {
for {
dockstat, err := docker.GetDockerStat()
if err != nil {
log.Println("err:", err)
} else {
log.Printf("=> docker: %+v\n", dockstat)
}
@timmyjl12
timmyjl12 / mem_tracker.py
Last active June 8, 2020 17:26
psutil Memory Tracker
# Memory Tracker
import psutil
import pandas as pd
import pendulum
import sqlite3
import time
conn = sqlite3.connect('mem_usage.db')
while 1==1:
@orangle
orangle / psutiltest.py
Created December 12, 2014 03:20
psutil use
#-*- coding: utf-8 -*-
#python2.7x
#author: orangleliu@gmail.com 2014-12-12
#psutiltest.py
'''
照着教程简单学习下psutil的使用,windows下试试
'''
import psutil
import datetime
@wiggin15
wiggin15 / gist:52ecddd4a9729ca187fe2ac76bb39c2a
Created September 5, 2017 08:29
psutil nosetest output
root@host-vaix01 (AIX 7.1) > psutil git:(aix) * python setup.py test
running test
Searching for ipaddress
Best match: ipaddress 1.0.18
Processing ipaddress-1.0.18-py2.7.egg
Using /root/psutil/.eggs/ipaddress-1.0.18-py2.7.egg
running egg_info
writing requirements to psutil.egg-info/requires.txt
writing psutil.egg-info/PKG-INFO
@ilius2
ilius2 / psutil-midnightbsd-tests.txt
Created October 11, 2021 18:11
psutil-midnightbsd-tests
sssss............s....sssssss..ss.........ssssssssss........................................F...s.........s..sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss..........sRun #1: extra-mem=8.0K, per-call=41.0B, calls=200
Run #2: extra-mem=8.0K, per-call=20.5B, calls=400
........s....ss.............ss........s...s.ss....s.............ss........s...s.ss....s.................E......ssssssssssssssssssssssss.............ssssssssssssss..s....................s.........................ss.............s....ss...............................E..ss...s.................s...................s........Run #1: extra-mem=340.0K, per-call=6.8K, calls=50
Run #2: extra-mem=2.8M, per-call=29.0K, calls=100
Run #3: extra-mem=4.2M, per-call=28.9K, calls=150
Run #4: extra-mem=5.6M, per-call=28.9K, calls=200
Run #5: extra-mem=7.1M, per-call=28.9K, calls=250
.......s...EE.................................ssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
=========================
test_cpu_count_logical (test_bsd.BSDSpecificTestCase) ... skipped 'not a BSD system'
test_disks (test_bsd.BSDSpecificTestCase) ... skipped 'not a BSD system'
test_process_create_time (test_bsd.BSDSpecificTestCase) ... skipped 'not a BSD system'
test_virtual_memory_total (test_bsd.BSDSpecificTestCase) ... skipped 'not a BSD system'
test_boot_time (test_bsd.FreeBSDSpecificTestCase) ... skipped 'not a FreeBSD system'
test_cmdline (test_bsd.FreeBSDSpecificTestCase) ... skipped 'not a FreeBSD system'
test_cpu_stats_ctx_switches (test_bsd.FreeBSDSpecificTestCase) ... skipped 'not a FreeBSD system'
test_cpu_stats_interrupts (test_bsd.FreeBSDSpecificTestCase) ... skipped 'not a FreeBSD system'
test_cpu_stats_soft_interrupts (test_bsd.FreeBSDSpecificTestCase) ... skipped 'not a FreeBSD system'
test_cpu_stats_syscalls (test_bsd.FreeBSDSpecificTestCase) ... skipped 'not a FreeBSD system'
@firetaker
firetaker / psutil_monitor_trove
Created February 14, 2017 05:20
psutil_monitor_trove
psutil_monitor_trove
todo