def parseProcCmd(self, fields=('<STR_LIT>', '<STR_LIT:user>', '<STR_LIT>',), threads=False):
args = []<EOL>headers = [f.lower() for f in fields]<EOL>args.append('<STR_LIT>')<EOL>args.append('<STR_LIT>')<EOL>if threads:<EOL><INDENT>args.append('<STR_LIT>')<EOL><DEDENT>field_ranges = []<EOL>fmt_strs = []<EOL>start = <NUM_LIT:0><EOL>for header in headers:<EOL><INDENT>field_width = psFieldWidth.get(header, psDefaultFieldWidth)<EOL>fmt_strs.append('<STR_LIT>' % (header, field_width))<EOL>end = start + field_width + <NUM_LIT:1><EOL>field_ranges.append((start,end))<EOL>start = end<EOL><DEDENT>args.append('<STR_LIT>')<EOL>args.append('<STR_LIT:U+002C>'.join(fmt_strs))<EOL>lines = self.execProcCmd(*args)<EOL>if len(lines) > <NUM_LIT:0>:<EOL><INDENT>stats = []<EOL>for line in lines:<EOL><INDENT>cols = []<EOL>for (start, end) in field_ranges:<EOL><INDENT>cols.append(line[start:end].strip())<EOL><DEDENT>stats.append(cols)<EOL><DEDENT>return {'<STR_LIT>': headers, '<STR_LIT>': stats}<EOL><DEDENT>else:<EOL><INDENT>return None<EOL><DEDENT>
Execute ps command with custom output format with columns from 
        fields and return result as a nested list.

        The Standard Format Specifiers from ps man page must be used for the
        fields parameter.

        @param fields:  List of fields included in the output.
                        Default: pid, user, cmd
        @param threads: If True, include threads in output. 
        @return:        List of headers and list of rows and columns.