Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: line not found on arm #188

Closed
giampaolo opened this issue May 23, 2014 · 11 comments
Closed

RuntimeError: line not found on arm #188

giampaolo opened this issue May 23, 2014 · 11 comments

Comments

@giampaolo
Copy link
Owner

From drakkan1...@gmail.com on July 19, 2011 14:36:20

What steps will reproduce the problem?  
1. install psutil on arm board
2. import psutil 

What is the expected output?  


What do you see instead?  
I expected no error instead I have:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File 
"/usr/lib/python2.6/site-packages/psutil-0.3.0-py2.6-linux-armv7l.egg/psutil/__init__.py",
 line 52, in <module>
    import psutil._pslinux as _psplatform
  File 
"/usr/lib/python2.6/site-packages/psutil-0.3.0-py2.6-linux-armv7l.egg/psutil/_pslinux.py",
 line 55, in <module>
    NUM_CPUS = _get_num_cpus()
  File 
"/usr/lib/python2.6/site-packages/psutil-0.3.0-py2.6-linux-armv7l.egg/psutil/_pslinux.py",
 line 45, in _get_num_cpus
    raise RuntimeError("line not found")
RuntimeError: line not found 

What version of psutil are you using? What Python version?  
psutil 0.3.0 

On what operating system? Is it 32bit or 64bit version?  
arm cortex a8 

Please provide any additional information below.  
the output of /proc/cpuinfo is the following:

Processor   : ARMv7 Processor rev 3 (v7l)
BogoMIPS    : 491.57
Features    : swp half thumb fastmult vfp edsp thumbee neon 
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x1
CPU part    : 0xc08
CPU revision    : 3

so is enough to change "processor" in "Processor" in 
/usr/lib/python2.6/site-packages/psutil-0.3.0-py2.6-linux
-armv7l.egg/psutil/_pslinux.py line _get_num_cpus() can you please use:

if line.startswith('processor') or line.startswith('Processor')

thanks

Original issue: http://code.google.com/p/psutil/issues/detail?id=188

@giampaolo
Copy link
Owner Author

From g.rodola on July 19, 2011 06:56:57

Mmm... this is unfortunate because starting from now I'm no longer trusting 
/proc fs. =)
Could you please try to run the test suite and tell me if there is any failure?

@giampaolo
Copy link
Owner Author

From drakkan1...@gmail.com on July 19, 2011 07:10:03

here is the output from the test suite:

test_BOOT_TIME (__main__.TestCase) ... ok
test_Popen (__main__.TestCase) ... ok
test_TOTAL_PHYMEM (__main__.TestCase) ... ok
test__str__ (__main__.TestCase) ... ok
test_cmdline (__main__.TestCase) ... ok
test_connection_fromfd (__main__.TestCase) ... ERROR
test_cpu_percent (__main__.TestCase) ... ok
test_cpu_times (__main__.TestCase) ... ok
test_cpu_times2 (__main__.TestCase) ... ok
test_create_time (__main__.TestCase) ... ok
test_deprecated_memory_functions (__main__.TestCase) ... ok
test_disk_partitions (__main__.TestCase) ... FAIL
test_disk_usage (__main__.TestCase) ... ok
test_eq (__main__.TestCase) ... ok
test_exe (__main__.TestCase) ... ok
test_fetch_all (__main__.TestCase) ... ok
test_get_children (__main__.TestCase) ... ok
test_get_connections (__main__.TestCase) ... ERROR
test_get_connections_all (__main__.TestCase) ... ok
test_get_io_counters (__main__.TestCase) ... FAIL
test_get_memory_info (__main__.TestCase) ... ok
test_get_memory_percent (__main__.TestCase) ... ok
test_get_num_threads (__main__.TestCase) ... ok
test_get_open_files (__main__.TestCase) ... ok
test_get_open_files2 (__main__.TestCase) ... ok
test_get_pid_list (__main__.TestCase) ... ok
test_get_process_list (__main__.TestCase) ... ok
test_get_set_ionice (__main__.TestCase) ... ok
test_get_threads (__main__.TestCase) ... ok
test_getcwd (__main__.TestCase) ... ok
test_getcwd_2 (__main__.TestCase) ... FAIL
test_gids (__main__.TestCase) ... ok
test_invalid_pid (__main__.TestCase) ... ok
test_is_running (__main__.TestCase) ... ok
test_kill (__main__.TestCase) ... ok
test_name (__main__.TestCase) ... ok
test_nice (__main__.TestCase) ... ok
test_parent_ppid (__main__.TestCase) ... ok
test_phymem_buffers (__main__.TestCase) ... ok
test_phymem_usage (__main__.TestCase) ... ok
test_pid (__main__.TestCase) ... ok
test_pid_0 (__main__.TestCase) ... ok
test_pid_exists (__main__.TestCase) ... ok
test_pid_exists_2 (__main__.TestCase) ... ok
test_process_iter (__main__.TestCase) ... ok
test_send_signal (__main__.TestCase) ... ok
test_status (__main__.TestCase) ... ok
test_suspend_resume (__main__.TestCase) ... ok
test_sys_cpu_percent (__main__.TestCase) ... ok
test_sys_cpu_percent_compare (__main__.TestCase) ... FAIL
test_sys_cpu_times (__main__.TestCase) ... ok
test_sys_cpu_times2 (__main__.TestCase) ... ok
test_sys_per_cpu_percent (__main__.TestCase) ... ok
test_sys_per_cpu_times (__main__.TestCase) ... ok
test_sys_per_cpu_times2 (__main__.TestCase) ... ok
test_terminal (__main__.TestCase) ... ok
test_terminate (__main__.TestCase) ... ok
test_test (__main__.TestCase) ... ok
test_uids (__main__.TestCase) ... ok
test_username (__main__.TestCase) ... ok
test_virtmem_usage (__main__.TestCase) ... FAIL
test_wait (__main__.TestCase) ... ok
test_wait_non_children (__main__.TestCase) ... ok
test_zombie_process (__main__.TestCase) ... ok
test_get_pids (_posix.PosixSpecificTestCase) ... ok
test_process_cmdline (_posix.PosixSpecificTestCase) ... ok
test_process_exe (_posix.PosixSpecificTestCase) ... ok
test_process_gid (_posix.PosixSpecificTestCase) ... ok
test_process_name (_posix.PosixSpecificTestCase) ... ok
test_process_parent_pid (_posix.PosixSpecificTestCase) ... ok
test_process_rss_memory (_posix.PosixSpecificTestCase) ... ok
test_process_uid (_posix.PosixSpecificTestCase) ... ok
test_process_username (_posix.PosixSpecificTestCase) ... ok
test_process_vsz_memory (_posix.PosixSpecificTestCase) ... ok
test_cached_phymem (_linux.LinuxSpecificTestCase) ... ok
test_disks (_linux.LinuxSpecificTestCase) ... ok
test_phymem_buffers (_linux.LinuxSpecificTestCase) ... ok
test_BOOT_TIME (__main__.LimitedUserTestCase) ... ok
test_Popen (__main__.LimitedUserTestCase) ... ok
test_TOTAL_PHYMEM (__main__.LimitedUserTestCase) ... ok
test__str__ (__main__.LimitedUserTestCase) ... ok
test_cmdline (__main__.LimitedUserTestCase) ... ok
test_connection_fromfd (__main__.LimitedUserTestCase) ... ok
test_cpu_percent (__main__.LimitedUserTestCase) ... ok
test_cpu_times (__main__.LimitedUserTestCase) ... ok
test_cpu_times2 (__main__.LimitedUserTestCase) ... ok
test_create_time (__main__.LimitedUserTestCase) ... ok
test_deprecated_memory_functions (__main__.LimitedUserTestCase) ... ok
test_disk_partitions (__main__.LimitedUserTestCase) ... ok
test_disk_usage (__main__.LimitedUserTestCase) ... ok
test_eq (__main__.LimitedUserTestCase) ... ok
test_exe (__main__.LimitedUserTestCase) ... ok
test_fetch_all (__main__.LimitedUserTestCase) ... ok
test_get_children (__main__.LimitedUserTestCase) ... ok
test_get_connections (__main__.LimitedUserTestCase) ... ok
test_get_connections_all (__main__.LimitedUserTestCase) ... ok
test_get_io_counters (__main__.LimitedUserTestCase) ... ok
test_get_memory_info (__main__.LimitedUserTestCase) ... ok
test_get_memory_percent (__main__.LimitedUserTestCase) ... ok
test_get_num_threads (__main__.LimitedUserTestCase) ... ok
test_get_open_files (__main__.LimitedUserTestCase) ... ok
test_get_open_files2 (__main__.LimitedUserTestCase) ... ok
test_get_pid_list (__main__.LimitedUserTestCase) ... ok
test_get_process_list (__main__.LimitedUserTestCase) ... ok
test_get_set_ionice (__main__.LimitedUserTestCase) ... ok
test_get_threads (__main__.LimitedUserTestCase) ... ok
test_getcwd (__main__.LimitedUserTestCase) ... ok
test_getcwd_2 (__main__.LimitedUserTestCase) ... ok
test_gids (__main__.LimitedUserTestCase) ... ok
test_invalid_pid (__main__.LimitedUserTestCase) ... ok
test_is_running (__main__.LimitedUserTestCase) ... ok
test_kill (__main__.LimitedUserTestCase) ... ok
test_name (__main__.LimitedUserTestCase) ... ok
test_nice (__main__.LimitedUserTestCase) ... ok
test_parent_ppid (__main__.LimitedUserTestCase) ... ok
test_phymem_buffers (__main__.LimitedUserTestCase) ... ok
test_phymem_usage (__main__.LimitedUserTestCase) ... ok
test_pid (__main__.LimitedUserTestCase) ... ok
test_pid_0 (__main__.LimitedUserTestCase) ... ok
test_pid_exists (__main__.LimitedUserTestCase) ... ok
test_pid_exists_2 (__main__.LimitedUserTestCase) ... ok
test_process_iter (__main__.LimitedUserTestCase) ... ok
test_send_signal (__main__.LimitedUserTestCase) ... ok
test_status (__main__.LimitedUserTestCase) ... ok
test_suspend_resume (__main__.LimitedUserTestCase) ... ok
test_sys_cpu_percent (__main__.LimitedUserTestCase) ... ok
test_sys_cpu_percent_compare (__main__.LimitedUserTestCase) ... ok
test_sys_cpu_times (__main__.LimitedUserTestCase) ... ok
test_sys_cpu_times2 (__main__.LimitedUserTestCase) ... ok
test_sys_per_cpu_percent (__main__.LimitedUserTestCase) ... ok
test_sys_per_cpu_times (__main__.LimitedUserTestCase) ... ok
test_sys_per_cpu_times2 (__main__.LimitedUserTestCase) ... ok
test_terminal (__main__.LimitedUserTestCase) ... ok
test_terminate (__main__.LimitedUserTestCase) ... ok
test_test (__main__.LimitedUserTestCase) ... ok
test_uids (__main__.LimitedUse...

@giampaolo
Copy link
Owner Author

From drakkan1...@gmail.com on July 19, 2011 07:10:03

...rTestCase) ... ok
test_username (__main__.LimitedUserTestCase) ... ok
test_virtmem_usage (__main__.LimitedUserTestCase) ... ok
test_wait (__main__.LimitedUserTestCase) ... ok
test_wait_non_children (__main__.LimitedUserTestCase) ... ok
test_zombie_process (__main__.LimitedUserTestCase) ... ok

======================================================================
ERROR: test_connection_fromfd (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_psutil.py", line 147, in inner
    return fun(self, *args, **kwargs)
  File "test_psutil.py", line 968, in test_connection_fromfd
    sock.bind(('127.0.0.1', 0))
  File "<string>", line 1, in bind
error: [Errno 99] Cannot assign requested address

======================================================================
ERROR: test_get_connections (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_psutil.py", line 147, in inner
    return fun(self, *args, **kwargs)
  File "test_psutil.py", line 941, in test_get_connections
    cons = p.get_connections()
  File 
"/usr/lib/python2.6/site-packages/psutil-0.3.0-py2.6-linux-armv7l.egg/psutil/__init__.py",
 line 402, in get_connections
    return self._platform_impl.get_connections()
  File 
"/usr/lib/python2.6/site-packages/psutil-0.3.0-py2.6-linux-armv7l.egg/psutil/_pslinux.py",
 line 251, in wrapper
    raise NoSuchProcess(self.pid, self._process_name)
NoSuchProcess: process no longer exists (pid=1065)

======================================================================
FAIL: test_disk_partitions (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_psutil.py", line 405, in test_disk_partitions
    self.assertTrue(os.path.exists(disk.device))
AssertionError

======================================================================
FAIL: test_get_io_counters (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_psutil.py", line 147, in inner
    return fun(self, *args, **kwargs)
  File "test_psutil.py", line 614, in test_get_io_counters
    self.assertTrue(io2.write_bytes > io1.write_bytes)
AssertionError

======================================================================
FAIL: test_getcwd_2 (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_psutil.py", line 147, in inner
    return fun(self, *args, **kwargs)
  File "test_psutil.py", line 868, in test_getcwd_2
    self.assertEqual(p.getcwd(), expected_dir)
AssertionError: '/home/root/py_compile/psutil-0.3.0/test' != 
'/home/root/py_compile/psutil-0.3.0'

======================================================================
FAIL: test_sys_cpu_percent_compare (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_psutil.py", line 380, in test_sys_cpu_percent_compare
    self.assertEqual(t1, t2)
AssertionError: 9.0999999999999996 != 0.0

======================================================================
FAIL: test_virtmem_usage (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_psutil.py", line 255, in test_virtmem_usage
    self.assertTrue(mem.total > 0)
AssertionError

----------------------------------------------------------------------
Ran 141 tests in 12.049s

FAILED (failures=5, errors=2)

@giampaolo
Copy link
Owner Author

From g.rodola on July 19, 2011 07:43:12

This is now fixed in r1107 .
As for the other failures I should put hands on an actual machine to fix them 
but I'd say they're not serious failures.

Labels: Milestone-0.3.1 OpSys-Linux Portability Crash

@giampaolo
Copy link
Owner Author

From g.rodola on July 19, 2011 07:43:46

Labels: -Priority-Medium Priority-High

@giampaolo
Copy link
Owner Author

From g.rodola on July 29, 2011 07:07:39

Status: FixedInSVN

@giampaolo
Copy link
Owner Author

From sgal...@gmail.com on September 10, 2011 17:10:52

hi
I've got then same problen on my readynas (sparc architecture)

# cat /proc/cpuinfo 
cpu     : Infrant Technologics, Inc. - neon version: 0
fpu     : Softfpu
ncpus probed    : 1
ncpus active    : 1
BogoMips    : 186.36
MMU     : version: 0
LP      : HW.FW version: 0.1
FPGA        : fpga000000-0 Configuration: 0
AHB arbitraion  : 7
CPU id      : 0
Switch      : 0
ASIC        : IT3107

@giampaolo
Copy link
Owner Author

From g.rodola on October 21, 2011 16:44:17

Labels: -Milestone-0.3.1

@giampaolo
Copy link
Owner Author

From g.rodola on October 21, 2011 16:45:26

Labels: Milestone-0.4.0

@giampaolo
Copy link
Owner Author

From g.rodola on October 28, 2011 20:44:14

Status: Fixed

@giampaolo
Copy link
Owner Author

From g.rodola on March 02, 2013 04:02:08

Updated csets after the SVN -> Mercurial migration: r1107 == revision 
a43299154f1e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant