changed top command to remove ansi
This commit is contained in:
@@ -100,14 +100,8 @@ def convert_to_megabytes(data_size):
|
||||
return int(size * unit_map[unit])
|
||||
|
||||
|
||||
def remove_ansi_escape(text):
|
||||
"""Removes ANSI escape sequences from a string."""
|
||||
ansi_escape = re.compile(r"\x1B(?:[@-Z\\^[\]m])+")
|
||||
return ansi_escape.sub("", text)
|
||||
|
||||
|
||||
def scaleMemstat():
|
||||
command = ["top", "-n", "1"]
|
||||
command = ["top", "-bn", "1"]
|
||||
|
||||
filename = "memStat.csv"
|
||||
collect = runCollect(command)
|
||||
|
||||
Reference in New Issue
Block a user