AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题

问题[htop](ubuntu)

Martin Hope
SwayamShree
Asked: 2020-12-20 14:36:26 +0800 CST

Rofi 不会在 Ubuntu 20.04 中启动某些程序

  • 0

我使用 Rofi 作为我的应用程序启动器。但是,当我尝试启动某些应用程序(如 anaconda-navigator、spyder)时,我收到以下错误消息:

无法执行:'spyder' 错误:'无法执行子进程“spyder”(没有这样的目录文件)'

但是,我从终端(alacritty)启动这些应用程序没有问题。

Rofi 甚至不启动 htop,尽管它没有给出关于 htop 的错误消息。

任何帮助将不胜感激。

编辑:Ubuntu 版本:20.04.1 | 窗口管理器:SPECTRWM

更新:当我使用以下命令从终端启动 rofi 时,Rofi 能够启动 anaconda-navigator 和 spyder 但不能启动 htop:

rofi -show 运行

但是,当我使用键绑定 super+shift+p 启动 rofi 时,它无法启动程序。

编辑 2:通过将 $PATH 添加到 ~/.profile 解决了问题

launcher htop
  • 1 个回答
  • 945 Views
Martin Hope
fernandezr
Asked: 2020-12-08 05:29:29 +0800 CST

启动时 Ubuntu 20.04 中的 RAM 使用率非常高

  • 1

当我启动计算机时,该htop命令显示 RAM 使用率非常高,即使没有启动 Web 浏览器,这是一种非常常见的资源消耗者。这是正常的吗?我能做些什么来减少这种巨大的 RAM 消耗吗?

Htop 作为普通用户

如果您需要更多信息或日志,我很感激提供。

Htop 以 root 用户身份,重新启动计算机后。 Htop 作为 root 用户

系统是在 Ubuntu 中使用 ZFS 安装的

ram zfs htop
  • 1 个回答
  • 633 Views
Martin Hope
MTG
Asked: 2020-11-15 09:14:08 +0800 CST

htop 和 sytem-monitor 显示 0 cpu ubuntu 20.04 ryzen 3950x

  • 0

我新建了一台新 PC,并使用 Ubuntu 20.04 进行双启动。我在使用 ryzen 3950x 时遇到问题,htop 和系统监视器无法识别 cpu(而不是 32 显示 1 个线程)。我必须用 acpi=off 启动它,因为 ubuntu 不会启动。是兼容性的问题吗?我的 BIOS 在构建 pc 时已更新(3 周前,B550 AORUS ELITE AX V2(修订版 1.0))你能帮我解决 htop/系统监视器中错误的线程数吗

我很困惑

(base) B550-AORUS-ELITE-AX-V2:~$ cat /proc/cpuinfo
processor   : 0
vendor_id   : AuthenticAMD
cpu family  : 23
model       : 113
model name  : AMD Ryzen 9 3950X 16-Core Processor
stepping    : 0
microcode   : 0x8701021
cpu MHz     : 3606.771
cache size  : 512 KB
physical id : 0
siblings    : 1
core id     : 0
cpu cores   : 1
apicid      : 0
initial apicid  : 0
fpu     : yes
fpu_exception   : yes
cpuid level : 16
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate sme ssbd mba sev ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr wbnoinvd arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif umip rdpid overflow_recov succor smca
bugs        : sysret_ss_attrs spectre_v1 spectre_v2 spec_store_bypass
bogomips    : 6986.68
TLB size    : 3072 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 43 bits physical, 48 bits virtual
power management: ts ttp tm hwpstate cpb eff_freq_ro [13] [14]

(base) B550-AORUS-ELITE-AX-V2:~$ sudo dmidecode -t 4 | egrep -i 'core (count|enabled)|thread count|Version'
    Version: AMD Ryzen 9 3950X 16-Core Processor            
    Core Count: 16
    Core Enabled: 16
    Thread Count: 32

(base) B550-AORUS-ELITE-AX-V2:~$ sudo dmidecode -s bios-version
[sudo] password: 
F10
(base) B550-AORUS-ELITE-AX-V2:~$ free -h
              total        used        free      shared  buff/cache   available
Mem:           62Gi       1,9Gi        59Gi       131Mi       1,8Gi        60Gi
Swap:          15Gi          0B        15Gi
(base) B550-AORUS-ELITE-AX-V2:~$ sudo lshw -C memory
  *-firmware                
       description: BIOS
       vendor: American Megatrends Inc.
       physical id: 0
       version: F10
       date: 09/18/2020
       size: 64KiB
       capacity: 32MiB
       capabilities: pci upgrade shadowing cdboot bootselect socketedrom edd int13floppy1200 int13floppy720 int13floppy2880 int5printscreen int14serial int17printer acpi usb biosbootspecification uefi
  *-memory
       description: System Memory
       physical id: 9
       slot: System board or motherboard
       size: 64GiB
     *-bank:0
          description: DIMM DDR4 Synchronous Unbuffered (Unregistered) 2133 MHz (0,5 ns)
          product: F4-3200C16-16GIS
          vendor: Unknown
          physical id: 0
          serial: 00000000
          slot: DIMM 0
          size: 16GiB
          width: 64 bits
          clock: 2133MHz (0.5ns)
     *-bank:1
          description: DIMM DDR4 Synchronous Unbuffered (Unregistered) 2133 MHz (0,5 ns)
          product: F4-3200C16-16GIS
          vendor: Unknown
          physical id: 1
          serial: 00000000
          slot: DIMM 1
          size: 16GiB
          width: 64 bits
          clock: 2133MHz (0.5ns)
     *-bank:2
          description: DIMM DDR4 Synchronous Unbuffered (Unregistered) 2133 MHz (0,5 ns)
          product: F4-3200C16-16GIS
          vendor: Unknown
          physical id: 2
          serial: 00000000
          slot: DIMM 0
          size: 16GiB
          width: 64 bits
          clock: 2133MHz (0.5ns)
     *-bank:3
          description: DIMM DDR4 Synchronous Unbuffered (Unregistered) 2133 MHz (0,5 ns)
          product: F4-3200C16-16GIS
          vendor: Unknown
          physical id: 3
          serial: 00000000
          slot: DIMM 1
          size: 16GiB
          width: 64 bits
          clock: 2133MHz (0.5ns)
  *-cache:0
       description: L1 cache
       physical id: c
       slot: L1 - Cache
       size: 1MiB
       capacity: 1MiB
       clock: 1GHz (1.0ns)
       capabilities: pipeline-burst internal write-back unified
       configuration: level=1
  *-cache:1
       description: L2 cache
       physical id: d
       slot: L2 - Cache
       size: 8MiB
       capacity: 8MiB
       clock: 1GHz (1.0ns)
       capabilities: pipeline-burst internal write-back unified
       configuration: level=2
  *-cache:2
       description: L3 cache
       physical id: e
       slot: L3 - Cache
       size: 64MiB
       capacity: 64MiB
       clock: 1GHz (1.0ns)
       capabilities: pipeline-burst internal write-back unified
       configuration: level=3
(base) B550-AORUS-ELITE-AX-V2:~$ 
cpu htop 20.04 amd-ryzen
  • 1 个回答
  • 379 Views
Martin Hope
Black Jack 21
Asked: 2020-06-22 02:48:03 +0800 CST

htop 内存使用情况与描述的条形图

  • 1

附件是htop命令的屏幕截图。我想知道为什么当使用 126GB 中的 4.1GB 时,Mem bar 会充满 50%。Mem bar 和 4.1GB 数字代表什么不同吗? 在此处输入图像描述

memory-usage ram htop
  • 1 个回答
  • 1926 Views
Martin Hope
singrium
Asked: 2020-05-13 02:52:45 +0800 CST

检查我的 Python 代码在多少个处理器内核上运行?

  • 3

我想检查我的 Python 脚本正在使用多少个内核。
假设我有这个代码:

while True:
    print('Hello World!')

当我运行时top,它会提供 CPU、内存、百分比以及其他信息,但不提供核心 ID 或进程正在使用的核心数量。

top - 11:44:15 up 1 day, 23:08,  1 user,  load average: 2.88, 2.39, 2.15
Tasks: 289 total,   5 running, 238 sleeping,   0 stopped,   0 zombie
%Cpu(s): 55.2 us, 31.8 sy,  0.0 ni, 12.8 id,  0.0 wa,  0.0 hi,  0.2 si,  0.0 st
KiB Mem :  7945496 total,  1027328 free,  4707680 used,  2210488 buff/cache
KiB Swap: 15999996 total, 14991876 free,  1008120 used.  2615420 avail Mem 

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                                                                                                                 
15336 lenovo    20   0 4393044 470488 192616 S   8.6  5.9 148:18.31 firefox                                                                                                                                 
 4412 lenovo    20   0 4521092 437940  65416 R  15.6  5.5  87:58.54 gnome-shell                                                                                                                             
 4221 root      20   0  561840  82500  45652 R   9.9  1.0  84:25.21 Xorg                                                                                                                                    
15395 lenovo    20   0 3871472 319376 151876 S   0.0  4.0  83:57.26 Web Content                                                                                                                             
 2838 lenovo    20   0 3993616 823816 158412 R  68.5 10.4  36:28.10 Web Content                                                                                                                             
 4435 lenovo     9 -11 2915368  11596   8836 S   0.3  0.1  35:46.08 pulseaudio                                                                                                                              
 3342 lenovo    20   0 3060860 324000 127948 S   8.6  4.1  27:53.92 atom                                                                                                                                    
29632 lenovo    20   0 3717204 750864 152688 S  10.3  9.5  22:25.05 Web Content                                                                                                                             
15443 lenovo    20   0 3273020 245772  50128 S   2.3  3.1  19:49.64 WebExtensions                                                                                                                           
 3293 lenovo    20   0 1291576 215972 112612 S   4.6  2.7  15:38.90 atom                                                                                                                                    
 3319 lenovo    20   0  734208 226016 104340 S   5.6  2.8  14:52.60 atom                                                                                                                                    
 1446 root     -51   0       0      0      0 S   1.0  0.0  14:21.71 irq/132-nvidia                                                                                                                          
16083 lenovo    20   0  446420  35468  27844 S   1.3  0.4  11:06.27 RDD Process                                                                                                                             
29733 lenovo    20   0 3537988 363160 235184 S   0.0  4.6   9:29.13 Web Content                                                                                                                             
29780 lenovo    20   0 3414220 363812 174640 S   0.3  4.6   7:50.64 Web Content                                                                                                                             
29570 lenovo    20   0 3068760 245412 125788 S   0.3  3.1   4:14.76 Web Content                                                                                                                             
 1733 gdm       20   0 3464584  75712  45704 S   0.0  1.0   4:08.74 gnome-shell  

我做了一些谷歌搜索,我发现了这个命令:

watch -tdn0.5 ps -mo pid,tid,%cpu,psr -p \`pgrep python\`

哪个输出:

  PID   TID %CPU PSR
15329     - 95.2   -
    - 15329 95.2   1

好吧,我不确定前面的命令是否真的有效。
如果有人能给出解释,我将不胜感激。

编辑:
我使用的是 Ubuntu 18.04 桌面版。
内核版本:

4.15.0-99-generic #100-Ubuntu SMP Wed Apr 22 20:32:56 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
python process top htop
  • 2 个回答
  • 3571 Views
Martin Hope
DEV
Asked: 2020-01-09 13:51:20 +0800 CST

使用 htop 跟踪进程

  • 0

我有一个运行一段时间的进程被杀死并每 15 秒重新启动一次,我想跟踪它的好值如何使用 htop 进行操作。我可以通过每次应用程序启动时的 PID 更改来跟踪使用 PID

nice htop
  • 1 个回答
  • 539 Views
Martin Hope
Patoshi パトシ
Asked: 2019-12-20 08:43:52 +0800 CST

你如何在 htop 命令中查看 cpu 温度?这对 WSL 有用吗?

  • 6

有没有办法在htop中查看 CPU 温度。我正在使用 windows10 wsl,所以我不确定 WSL1 是否可以访问 CPU 温度读数。

cpu temperature htop windows-subsystem-for-linux
  • 2 个回答
  • 5791 Views
Martin Hope
Display name
Asked: 2019-10-23 06:51:10 +0800 CST

终端命令“htop”的自定义键盘快捷键不起作用

  • 3

在 Ubuntu 18.04 上,我可以设置自定义键盘快捷键以通过以下方式运行终端命令:

Settings > Devices > Keyboard > +

名称:htop 键盘快捷键
命令:htop
快捷键:Ctrl++SuperDelete

当我为其他终端命令创建快捷方式时,这通常没有问题,除了htop. 当我尝试发出htopto Ctrl++Super时Delete,它不起作用。

我按Ctrl+ Super+Delete并且 htop 系统监视器没有在我的系统上启动。怎么了?我以这种方式创建的所有其他键盘快捷键都可以正常工作。

command-line shortcut-keys system-monitor reboot htop
  • 1 个回答
  • 1623 Views
Martin Hope
ElConrado
Asked: 2019-08-02 05:10:23 +0800 CST

如何使用 htop 或其他系统监视器作为屏幕保护程序

  • 4

我想制作像 htop 这样的系统监视器作为屏幕保护程序或当我阻止计算机时。是否可以根据需要使用 htop 或其他终端系统监视器?

configuration system screensaver monitor htop
  • 1 个回答
  • 666 Views
Martin Hope
Programster
Asked: 2019-06-25 01:51:40 +0800 CST

去除 htop 灰色填充物

  • 4

我最近在查看 htop 时开始注意到我的一些服务器中有灰色的“填充物”,如下图所示。

在此处输入图像描述

有谁知道如何摆脱这种情况并回到“正常”状态,如下所示:

在此处输入图像描述

htop
  • 1 个回答
  • 470 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve