syspy
0.1
syspy windows system information tool with python
Main Page
Related Pages
Namespaces
Classes
Files
File List
test.py
Go to the documentation of this file.
1
from
disk
import
Disk
2
3
dsc = Disk()
4
5
def
diskPartitions
():
6
"""
7
Part Device: C:\
8
Usage Total: 113.4G
9
Usage Used: 57.8G
10
Usage Free: 55.6G
11
Usage Percent: 50
12
Part Type: NTFS
13
Part Mountpoint: C:\
14
"""
15
a,b,c,d,e,f,g = dsc.getDiskPartitions()
16
17
print(
"Part Device: {}\nUsage Total: {}\nUsage Used: {}\nUsage Free: {}"
\
18
"\nUsage Percent: {}\nPart Type: {}\nPart Mountpoint: {}"
.format(a,b,c,d,e,f,g))
19
20
def
diskUsage
():
21
"""
22
Total: 113.4G Used: 57.7G Free: 55.6G Percent: 50.9
23
"""
24
a,b,c,d = dsc.getDiskUsage()
25
print(
"Total: %s Used: %s Free: %s Percent: %s"
% (a,b,c,d))
26
27
28
def
diskIoCounters
():
29
"""
30
Read Count: 442404
31
Write Count: 246040
32
Read Bytes: 13650447872
33
Write Bytes: 4814406656
34
Read Times: 649029420 ms
35
Write Time: 57618720 ms
36
"""
37
a,b,c,d,e,f = dsc.getDiskIoCounters()
38
print(
"Read Count: %s\nWrite Count: %s\nRead Bytes: %s\nWrite Bytes: %s\nRead Times: %s ms\nWrite Time: %s ms"
39
% (a,b,c,d,e,f))
40
41
42
#diskPartitions()
43
#diskUsage()
44
diskIoCounters
()
syspy.disk.test.diskPartitions
def diskPartitions()
Definition:
test.py:5
syspy.disk.test.diskUsage
def diskUsage()
Definition:
test.py:20
syspy.disk.test.diskIoCounters
def diskIoCounters()
Definition:
test.py:28
disk
test.py
Generated on Sun Apr 26 2015 22:56:30 for syspy by
1.8.9.1