Omar Polo wrote:
> Stefan Hagen <[email protected]> writes:
> > Lewis ingraham wrote:
> >> Also I for some reason cannot get the program to launch when it is built
> >> and installed. It comes up as "command not found" when I type in bpytop.
> >>
> >> Project I am currently trying to port properly:
> >> https://github.com/aristocratos/bpytop
> >
> > There is an easier way to get started with python ports. We have
> > portgen(1) which can give you a head start with perl, python, ruby
> > and go ports.
> >
> > Try "portgen bpytop". It will generate as much of a port it can in
> > /usr/ports/mystuff/pypi. Then examine what it did and fix it up.
> >
> > The port you're trying to create is not using the usual setup.py build
> > script. Instead it has a Makefile, which copies files around. Portgen
> > is not prepared for that and it needs fixing.
> >
> > I added NO_BUILD=Yes to the port system from trying to invoke setup.py.
> > Next I added a do-install: target with will be execute as "make install"
> > command.
> >
> > The (quickly) fixed port is attached. It works here.
> >
> > Best regards,
> > Stefan
>
> Port looks fine and works, even thought it's a bit too "flashy" for my
> taste :)
>
> The distinfo wasn't right, it complained that "Size does not match for
> bpytop-1.0.67.tar.gz" and had to makesum again. pypi releases are
> mutable?
>
> % make makesum
> ===> Checking files for bpytop-1.0.67
> >> Fetch https://pypi.io/packages/source/b/bpytop/bpytop-1.0.67.tar.gz
> bpytop-1.0.67.tar.gz 100% |*****************************| 77732 00:00
> --- old
> +++ new
> @@ -1,2 +1,2 @@
> -SHA256 (bpytop-1.0.67.tar.gz) = 4/Ame9QKWAFrWsge1kJPHI2VOzOlN1RrIt0aKwGwepc=
> -SIZE (bpytop-1.0.67.tar.gz) = 628491
> +SHA256 (bpytop-1.0.67.tar.gz) = izOONif6bpkeg2vuYe84mI9qejo33AXHV6krpDePlbs=
> +SIZE (bpytop-1.0.67.tar.gz) = 77732
Hmm, strange. But I get the same updated checksum now. But where else
should I have gotten it from?
bpytop is starting, but it's not without issues. For example:
- start bpytop
- select any process with arrow up/down keys
- hit enter
- Poof!
12/12/21 (19:04:34) | ERROR: Exception while getting cpu frequency!
12/12/21 (19:04:34) | ERROR: module 'psutil' has no attribute 'cpu_freq'
Traceback (most recent call last):
File "/usr/local/bin/bpytop", line 3060, in _collect
if CONFIG.show_cpu_freq and hasattr(psutil.cpu_freq(), "current"):
AttributeError: module 'psutil' has no attribute 'cpu_freq'
12/12/21 (19:04:53) | ERROR: Exception while getting cpu frequency!
12/12/21 (19:04:53) | ERROR: module 'psutil' has no attribute 'cpu_freq'
Traceback (most recent call last):
File "/usr/local/bin/bpytop", line 3060, in _collect
if CONFIG.show_cpu_freq and hasattr(psutil.cpu_freq(), "current"):
AttributeError: module 'psutil' has no attribute 'cpu_freq'
12/12/21 (19:05:28) | ERROR: Exception when sending signal 2 to pid 15942
12/12/21 (19:05:28) | ERROR: [Errno 1] Operation not permitted
Traceback (most recent call last):
File "/usr/local/bin/bpytop", line 5459, in process_keys
os.kill(pid, sig)
PermissionError: [Errno 1] Operation not permitted
12/12/21 (19:05:29) | ERROR: Exception when sending signal 2 to pid 15942
12/12/21 (19:05:29) | ERROR: [Errno 1] Operation not permitted
Traceback (most recent call last):
File "/usr/local/bin/bpytop", line 5459, in process_keys
os.kill(pid, sig)
PermissionError: [Errno 1] Operation not permitted
12/12/21 (19:05:32) | ERROR: Exception when sending signal 2 to pid 58422
12/12/21 (19:05:32) | ERROR: [Errno 1] Operation not permitted
Traceback (most recent call last):
File "/usr/local/bin/bpytop", line 5459, in process_keys
os.kill(pid, sig)
PermissionError: [Errno 1] Operation not permitted
13/12/21 (11:46:12) | ERROR: Exception while getting cpu frequency!
13/12/21 (11:46:12) | ERROR: module 'psutil' has no attribute 'cpu_freq'
Traceback (most recent call last):
File "/usr/local/bin/bpytop", line 3060, in _collect
if CONFIG.show_cpu_freq and hasattr(psutil.cpu_freq(), "current"):
AttributeError: module 'psutil' has no attribute 'cpu_freq'
13/12/21 (11:46:15) | ERROR: Data collection thread failed with exception:
invalid attr name 'cpu_num'
Traceback (most recent call last):
File "/usr/local/bin/bpytop", line 2938, in _runner
collector._collect()
File "/usr/local/bin/bpytop", line 3775, in _collect
cls.details = det.as_dict(attrs=attrs, ad_value="")
File "/usr/local/lib/python3.9/site-packages/psutil/__init__.py", line 512,
in as_dict
raise ValueError("invalid attr name%s %s" % (
ValueError: invalid attr name 'cpu_num'
13/12/21 (11:46:16) | WARNING: Exiting with errorcode (1). Runtime 0:00:04
And if you're very brave and run it as root...
12/12/21 (18:52:20) | ERROR: Data collection thread failed with exception:
can't allocate enough space for KERN_PROC_ARGV
Traceback (most recent call last):
File "/usr/local/bin/bpytop", line 2938, in _runner
collector._collect()
File "/usr/local/bin/bpytop", line 3708, in _collect
for p in sorted(psutil.process_iter(cls.p_values + (["memory_info"] if
CONFIG.proc_mem_bytes else []), err), key=lambda p: eval(sort_cmd),
reverse=reverse):
File "/usr/local/lib/python3.9/site-packages/psutil/__init__.py", line 1439,
in process_iter
yield add(pid)
File "/usr/local/lib/python3.9/site-packages/psutil/__init__.py", line 1416,
in add
proc.info = proc.as_dict(attrs=attrs, ad_value=ad_value)
File "/usr/local/lib/python3.9/site-packages/psutil/__init__.py", line 525,
in as_dict
ret = meth()
File "/usr/local/lib/python3.9/site-packages/psutil/__init__.py", line 677,
in cmdline
return self._proc.cmdline()
File "/usr/local/lib/python3.9/site-packages/psutil/_psbsd.py", line 550, in
wrapper
return fun(self, *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/psutil/_psbsd.py", line 668, in
cmdline
return cext.proc_cmdline(self.pid)
RuntimeError: can't allocate enough space for KERN_PROC_ARGV
12/12/21 (18:52:20) | WARNING: Exiting with errorcode (1). Runtime 0:00:00
13/12/21 (08:12:07) | ERROR: Exception while getting cpu frequency!
13/12/21 (08:12:07) | ERROR: module 'psutil' has no attribute 'cpu_freq'
Traceback (most recent call last):
File "/usr/local/bin/bpytop", line 3060, in _collect
if CONFIG.show_cpu_freq and hasattr(psutil.cpu_freq(), "current"):
AttributeError: module 'psutil' has no attribute 'cpu_freq'
13/12/21 (08:14:16) | INFO: Loglevel set to INFO
13/12/21 (08:14:25) | ERROR: Exception while getting cpu frequency!
13/12/21 (08:14:25) | ERROR: module 'psutil' has no attribute 'cpu_freq'
Traceback (most recent call last):
File "/usr/local/bin/bpytop", line 3060, in _collect
if CONFIG.show_cpu_freq and hasattr(psutil.cpu_freq(), "current"):
AttributeError: module 'psutil' has no attribute 'cpu_freq'
13/12/21 (08:14:31) | ERROR: Exception while getting cpu frequency!
13/12/21 (08:14:31) | ERROR: module 'psutil' has no attribute 'cpu_freq'
Traceback (most recent call last):
File "/usr/local/bin/bpytop", line 3060, in _collect
if CONFIG.show_cpu_freq and hasattr(psutil.cpu_freq(), "current"):
AttributeError: module 'psutil' has no attribute 'cpu_freq'
13/12/21 (08:14:43) | ERROR: Exception while getting cpu frequency!
13/12/21 (08:14:43) | ERROR: module 'psutil' has no attribute 'cpu_freq'
Traceback (most recent call last):
File "/usr/local/bin/bpytop", line 3060, in _collect
if CONFIG.show_cpu_freq and hasattr(psutil.cpu_freq(), "current"):
AttributeError: module 'psutil' has no attribute 'cpu_freq'
13/12/21 (08:15:28) | ERROR: Data collection thread failed with exception:
invalid attr name 'cpu_num'
Traceback (most recent call last):
File "/usr/local/bin/bpytop", line 2938, in _runner
collector._collect()
File "/usr/local/bin/bpytop", line 3775, in _collect
cls.details = det.as_dict(attrs=attrs, ad_value="")
File "/usr/local/lib/python3.9/site-packages/psutil/__init__.py", line 512,
in as_dict
raise ValueError("invalid attr name%s %s" % (
ValueError: invalid attr name 'cpu_num'
13/12/21 (08:15:29) | WARNING: Exiting with errorcode (1). Runtime 0:00:46
13/12/21 (11:48:00) | ERROR: Exception while getting cpu frequency!
13/12/21 (11:48:00) | ERROR: module 'psutil' has no attribute 'cpu_freq'
Traceback (most recent call last):
File "/usr/local/bin/bpytop", line 3060, in _collect
if CONFIG.show_cpu_freq and hasattr(psutil.cpu_freq(), "current"):
AttributeError: module 'psutil' has no attribute 'cpu_freq'
13/12/21 (11:48:04) | ERROR: Data collection thread failed with exception:
invalid attr name 'cpu_num'
Traceback (most recent call last):
File "/usr/local/bin/bpytop", line 2938, in _runner
collector._collect()
File "/usr/local/bin/bpytop", line 3775, in _collect
cls.details = det.as_dict(attrs=attrs, ad_value="")
File "/usr/local/lib/python3.9/site-packages/psutil/__init__.py", line 512,
in as_dict
raise ValueError("invalid attr name%s %s" % (
ValueError: invalid attr name 'cpu_num'
13/12/21 (11:48:04) | WARNING: Exiting with errorcode (1). Runtime 0:00:04