blob: b4456fd29b4b195021702dc5300c67825e0fa9e9 [file] [log] [blame]
mblighc6b01ed2006-10-13 17:03:26 +00001#!/usr/bin/python
mbligh4983e602006-05-18 18:27:31 +00002import os,os.path,shutil
3from autotest_utils import *
4
5files = ['/proc/pci', '/proc/meminfo', '/proc/slabinfo', '/proc/version',
6 '/proc/cpuinfo']
mbligh8a5a6112006-06-02 00:18:59 +00007commands = ['lshw', 'uname -a', 'lspci -vvn']
mbligh4983e602006-05-18 18:27:31 +00008path = ['/usr/bin', '/bin']
9
10def run_command(command, output):
11 for dir in path:
12 pathname = dir + '/' + command
13 if (os.path.exists(pathname)):
14 system(pathname + ' > ' + output)
15
16for command in commands:
17 run_command(command, os.path.basename(command))
18
19for file in files:
mbligh72a6d962006-05-24 18:46:56 +000020 if (os.path.exists(file)):
21 shutil.copyfile(file, os.path.basename(file))
mbligh4983e602006-05-18 18:27:31 +000022