| Server IP : 178.63.100.251 / Your IP : 216.73.216.228 Web Server : LiteSpeed System : Linux dobby.thevpsserver.com 4.18.0-553.16.1.lve.el8.x86_64 #1 SMP Tue Aug 13 17:45:03 UTC 2024 x86_64 User : truewayi ( 1855) PHP Version : 7.4.33 Disable Function : show_source,system,shell_exec,passthru,exec,popen,proc_open MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /lib/python3.6/site-packages/tuned/profiles/functions/ |
Upload File : |
import os
import tuned.logs
from . import base
from tuned.utils.commands import commands
log = tuned.logs.get()
class cpulist_unpack(base.Function):
"""
Conversion function: unpacks CPU list in form 1-3,4 to 1,2,3,4
"""
def __init__(self):
# arbitrary number of arguments
super(cpulist_unpack, self).__init__("cpulist_unpack", 0)
def execute(self, args):
if not super(cpulist_unpack, self).execute(args):
return None
return ",".join(str(v) for v in self._cmd.cpulist_unpack(",,".join(args)))