Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/cpulist.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,17 @@

from __future__ import print_function

import platform, sys, os, itertools, re
import itertools
import os
import platform
import re
import sys

o_verbose = 0


try:
from pyperf.perf_util import *
from pyperf.perf_util import list_cpusetstr
check_cpusetstr = True
except ImportError:
def file_word(fn):
Expand Down
17 changes: 12 additions & 5 deletions src/sysreport.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@

from __future__ import print_function

import os, sys, platform, subprocess, multiprocessing, json, datetime, struct
import datetime
import multiprocessing
import os
import platform
import struct
import subprocess
import sys

# import gzip for reading /proc/config.gz
try:
Expand All @@ -42,11 +48,10 @@
pass

import cpulist

import strcolor
from strcolor import colorize

_is_arm = (platform.machine() in ["armv8l", "aarch64"])
_is_arm = platform.machine() in ("armv8l", "aarch64")

o_verbose = 0

Expand Down Expand Up @@ -214,7 +219,7 @@ def acpi_irqs():
irqs = {}
with open("/sys/firmware/acpi/tables/APIC", "rb") as f:
f.read(4) # signature (b"APIC")
hdr = f.read(32) # general ACPI header
_hdr = f.read(32) # general ACPI header
f.read(8) # APIC
while True:
ih = f.read(2)
Expand Down Expand Up @@ -508,7 +513,9 @@ def pyperf_installed():
"""
try:
sys.path.append(os.path.join(os.path.dirname(__file__), "pyperf"))
import perf_enum, perf_attr, perf_events
import perf_attr
import perf_enum
import perf_events
except ImportError:
return None # unknown
try:
Expand Down