# FreeBSD 9-STABLE + htop



## alie (Oct 12, 2011)

Hi guys,

Anyone getting this issue:




htop unable to list down all running processes


----------



## Carpetsmoker (Oct 12, 2011)

Do you have linprocfs mounted?


----------



## alie (Oct 12, 2011)

Carpetsmoker said:
			
		

> Do you have linprocfs mounted?



Yes and here is my fstab

```
/dev/ad10s1a            /                       ufs             rw              1       1
linproc                 /usr/compat/linux/proc  linprocfs       rw              0       0
proc                    /proc                   procfs          rw              0       0
```


----------



## Carpetsmoker (Oct 12, 2011)

your /etc/fstab says exactly nothing about what is currently mounted. Use the mount(8) command to check what is currently mounted.

I don't know if this is your problem, but on my FreeBSD 9 machine I can't mount linprocfs (?) It gives me an error.


----------



## DutchDaemon (Oct 12, 2011)

I'm pretty sure the mount must be called linproc*fs*, not linproc.


----------



## MarcoB (Oct 12, 2011)

I had this too with htop on  8-STABLE i386, so I deinstalled it. Linprocfs is mounted btw.


----------



## alie (Oct 13, 2011)

Carpetsmoker said:
			
		

> your /etc/fstab says exactly nothing about what is currently mounted. Use the mount(8) command to check what is currently mounted.




```
root@fbsd(~)# mount
/dev/ad10s1a on / (ufs, local)
devfs on /dev (devfs, local, multilabel)
linprocfs on /usr/compat/linux/proc (linprocfs, local)
procfs on /proc (procfs, local)
```


----------



## derivativo (Oct 20, 2011)

I'm also with this problem on 8.2-STABLE.


----------



## AASoft (Oct 22, 2011)

Same problem, 8.2-STABLE as well as derivativo. linprocfs mounted, yes.
If it matters, I have the "linux_base-f10" port installed, perhaps I need the "fc4" one instead?


----------



## MarcoB (Oct 22, 2011)

Before the latest update of htop it worked fine with f10.


----------



## alie (Nov 11, 2011)

This issue still exist in 9.0-RC2


----------



## Twister (Jan 26, 2012)

htop is working fine


```
20:38:21 root@gw ~# uname -a
FreeBSD gw.xxx.ru[B] 9.0-RELEASE[/B] FreeBSD 9.0-RELEASE #1: Wed Jan 25 22:15:10 MSK 2012
[email]root@gw.xxx.ru[/email]:/usr/obj/usr/src/sys/gw-x64-2012-jan-24-01  [B]amd64[/B]
20:43:10 root@gw ~# mount
/dev/ada0s3a on / (ufs, local, journaled soft-updates)
devfs on /dev (devfs, local, multilabel)
/dev/ada0s3d on /var (ufs, local, journaled soft-updates)
/dev/ada0s3f on /usr (ufs, local, journaled soft-updates)
/dev/ada1p1 on /tmp (ufs, local, journaled soft-updates)
opt on /opt (zfs, local, nfsv4acls)
[B]linprocfs [/B]on /usr/compat/linux/proc (linprocfs, local)
```


----------



## oliwiak82 (Feb 6, 2012)

Same problem: 

```
[root@gw ~]# mount
/dev/raid/r0s1a on / (ufs, local)
devfs on /dev (devfs, local, multilabel)
/dev/raid/r0s1e on /tmp (ufs, local, soft-updates)
/dev/raid/r0s1f on /usr (ufs, local, soft-updates)
/dev/raid/r0s1d on /var (ufs, local, soft-updates)
linprocfs on /usr/compat/linux/proc (linprocfs, local)
procfs on /proc (procfs, local)
```



```
[root@gw ~]# uname -a
FreeBSD gw.xxx.org 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Sat Feb  4 13:51:54 CET 2012     [email]root@gw.xxx.org[/email]:/usr/obj/usr/src/sys/gw  amd64
```


----------



## Twister (Feb 7, 2012)

Hello!

I have this in kernel config:

```
##########################################################
# ABI Emulation

# Enable 32-bit runtime support for FreeBSD/i386 binaries.
options         COMPAT_FREEBSD32

# Enable 32-bit Linux ABI emulation 
# (requires COMPAT_43 and COMPAT_FREEBSD32)
options         COMPAT_LINUX32

# Enable the linux-like proc filesystem support 
# (requires COMPAT_LINUX32 and PSEUDOFS)
options         LINPROCFS

# Enable the linux-like sys filesystem support 
# (requires COMPAT_LINUX32 and PSEUDOFS)
options         LINSYSFS

# Linux-specific pseudo devices support
device          lindev
```

I think htop needs this


----------



## da1 (Feb 8, 2012)

I think you need linprocfs mounted under /usr/compat/linux/proc and not somewhere else.


----------



## oliwiak82 (Feb 11, 2012)

@Twister
I have recompiled kernel with those options, and still htop does not show process list.

@da1
As you can see from my previews post *I* have mounted linprocfs under /usr/compat/linux/proc

@all
Any other ideas?


----------



## unull (Feb 15, 2012)

According to linprocfs(5) linproc should be mounted to /compat/linux/proc.

I have the same issue with htop in 9.0 RELEASE.


----------



## Twister (Feb 16, 2012)

unull said:
			
		

> According to linprocfs(5) linproc should be mounted to /compat/linux/proc.
> 
> I have the same issue with htop in 9.0 RELEASE.



In root /compat is symbolic link to /usr/compat

2 *oliwiak82*
Check if you have this link in root?
My root (just for example):


```
13:53:17 root@gw ~# ls -al /
total 12130
drwxr-xr-x  22 root  wheel         1024 30 ÑÐ½Ð² 00:11 .
drwxr-xr-x  22 root  wheel         1024 30 ÑÐ½Ð² 00:11 ..
drwxr-xr-x   2 root  wheel          512 30 ÑÐ½Ð² 00:11 .config
-rw-r--r--   2 root  wheel          798 26 ÑÐ½Ð² 03:42 .cshrc
-rw-r--r--   2 root  wheel          263 26 ÑÐ½Ð² 03:42 .profile
drwxrwxr-x   2 root  operator       512 25 ÑÐ½Ð² 00:19 .snap
-r--------   1 root  wheel     12288000 25 ÑÐ½Ð² 00:19 .sujournal
-r--r--r--   1 root  wheel         6200 26 ÑÐ½Ð² 03:42 COPYRIGHT
drwxr-xr-x   2 root  wheel         1024 26 ÑÐ½Ð² 03:37 bin
drwxr-xr-x   8 root  wheel         1024 26 ÑÐ½Ð² 03:42 boot
lrwxr-xr-x   1 root  wheel           11 26 ÑÐ½Ð² 10:10 [B]compat -> /usr/compat[/B]
dr-xr-xr-x  12 root  wheel          512 14 Ñ„ÐµÐ² 21:22 dev
drwxr-xr-x   2 root  wheel          512 24 ÑÐ½Ð² 20:46 dist
drwxr-xr-x  20 root  wheel         2048 14 Ñ„ÐµÐ² 17:22 etc
lrwxr-xr-x   1 root  wheel            8 25 ÑÐ½Ð² 00:31 home -> usr/home
drwxr-xr-x   6 root  wheel         1024 13 Ñ„ÐµÐ² 00:58 jail
drwxr-xr-x   3 root  wheel         1536 26 ÑÐ½Ð² 03:38 lib
drwxr-xr-x   3 root  wheel          512 26 ÑÐ½Ð² 03:40 libexec
drwxr-xr-x   2 root  wheel          512  3 ÑÐ½Ð² 11:55 media
drwxr-xr-x   2 root  wheel          512  3 ÑÐ½Ð² 11:55 mnt
drwxr-xr-x   5 root  wheel            5 28 Ð½Ð¾Ñ 17:20 opt
dr-xr-xr-x   2 root  wheel          512  3 ÑÐ½Ð² 11:55 proc
drwxr-xr-x   2 root  wheel         2560 26 ÑÐ½Ð² 03:38 rescue
drwxr-xr-x   3 root  wheel         1024  8 Ñ„ÐµÐ² 23:43 root
drwxr-xr-x   2 root  wheel         2560 26 ÑÐ½Ð² 03:39 sbin
lrwxr-xr-x   1 root  wheel           11 26 ÑÐ½Ð² 03:36 sys -> usr/src/sys
drwxrwxrwt  21 root  wheel         1024 16 Ñ„ÐµÐ² 03:15 tmp
drwxr-xr-x  19 root  wheel         1024 29 ÑÐ½Ð² 23:00 usr
drwxr-xr-x  26 root  wheel         1024 14 Ñ„ÐµÐ² 21:22 var
```


----------



## unull (Feb 17, 2012)

Twister said:
			
		

> In root /compat is symbolic link to /usr/compat



This is not the case on my fresh 9.0 installation. Is that maybe a left-over from an upgrade?


----------



## Twister (Feb 18, 2012)

unull said:
			
		

> This is not the case on my fresh 9.0 installation. Is that maybe a left-over from an upgrade?



May be.
My installation was fresh too. I have created this links.


----------



## oliwiak82 (Feb 19, 2012)

Hello


```
[root@forteca /]# ls -la |grep compat
lrwxr-xr-x   1 root  wheel       10 Apr 17  2011 compat -> usr/compat
```


----------



## unull (Feb 20, 2012)

oliwiak82 said:
			
		

> Hello
> 
> 
> ```
> ...



As I said before, this is most likely a left-over from pre 9.0.

Anyway, even moving /compat to /usr/compat and creating a symlink from /compat to /usr/compat does not fix the issue with htop (or any other tool that relies on linprocfs to gather process stats, for example utop)


----------



## Twister (Feb 20, 2012)

@unull
@oliwiak82

Show please 
	
	



```
pkg_info | grep htop
```
And 
	
	



```
pkg_info -r <htop-with-version-number>
```


----------



## oliwiak82 (Feb 23, 2012)

```
[root@forteca ~]# pkg_info | grep htop
htop-0.9_1          A better top(1) - interactive process viewer
```


```
[root@forteca ~]# pkg_info -r htop-0.9_1                
Information for htop-0.9_1:

Depends on:
Dependency: lsof-4.86A,6
Dependency: ncurses-5.9
Dependency: libexecinfo-1.1_3
```


----------



## Twister (Feb 24, 2012)

Hello!

This is mine.

```
13:30:03 root@gw /usr/ports/sysutils/htop# pkg_info | grep htop
htop-0.9_1          A better top(1) - interactive process viewer
13:30:21 root@gw /usr/ports/sysutils/htop# pkg_info -r htop-0.9_1
Information for htop-0.9_1:

Depends on:
Dependency: lsof-4.86A,6
Dependency: libexecinfo-1.1_3
```

And - how I built it:

```
13:30:52 root@gw /usr/ports/sysutils/htop# make showconfig-recursive
===> The following configuration options are available for htop-0.9_1 and dependencies
===> The following configuration options are available for htop-0.9_1:
     LSOF=On (default) "Enable lsof support"
===> Use 'make config' to modify these settings
===> The following configuration options are available for python27-2.7.2_3:
     THREADS=on (default) "Enable thread support"
     SEM=off (default) "Use POSIX semaphores (experimental)"
     PTH=off (default) "Use GNU Pth for threading/multiprocessing"
     UCS4=on (default) "Use UCS4 for unicode support"
     PYMALLOC=on (default) "Use python's internal malloc"
     IPV6=on (default) "Enable IPv6 support"
     FPECTL=off (default) "Enable floating point exception handling"
===> Use 'make config' to modify these settings
===> The following configuration options are available for perl-5.12.4_3:
     DEBUGGING=off "Build with debugging support"
     GDBM=off "Build GDBM_File extension"
     PERL_MALLOC=off "Use Perl malloc"
     PERL_64BITINT=on "Use 64 bit integers (on i386)"
     THREADS=off "Build threaded perl"
     MULTIPLICITY=off "Use multiplicity"
     SITECUSTOMIZE=off "Run-time customization of @INC"
     USE_PERL=on "Rewrite links in /usr/bin"
===> Use 'make config' to modify these settings
===> The following configuration options are available for m4-1.4.16,1:
     LIBSIGSEGV=Off (default) "Use libsigsegv for better diagnostics"
===> Use 'make config' to modify these settings
===> The following configuration options are available for libiconv-1.13.1_1:
     EXTRA_ENCODINGS=on (default) "Include extra character sets"
     EXTRA_PATCHES=off (default) "Apply patches to fix CP932, add EUCJP-MS"
===> Use 'make config' to modify these settings
```
I can't understand - where ncurses came from in your case?


----------



## oliwiak82 (Mar 11, 2012)

Hello,


```
[root@gw /usr/ports/sysutils/htop]# make deinstall
[root@gw /usr/ports/sysutils/htop]# pkg_add -r htop
[root@gw ~]# pkg_info | grep htop
htop-0.9_1          A better top(1) - interactive process viewer
[root@gw ~]# pkg_info -r htop-0.9_1
Information for htop-0.9_1:

Depends on:
Dependency: lsof-4.86A,6
Dependency: libexecinfo-1.1_3
```

Htop works good now.

Regarding ncurses. I had flag in ports:

```
[root@gw ~]# cat /usr/ports/sysutils/htop/Makefile |grep -i ncurses
USE_NCURSES=    yes
```

So maybe there are some problems with ncurses?


----------



## unull (Mar 16, 2012)

oliwiak82 said:
			
		

> Hello,
> 
> 
> ```
> ...



This is working for me, too.


----------



## zennybsd (Mar 16, 2012)

*/compat or /usr/compat not found*

I am having problem with htop running just because that when I tried to mount linprocfs, it reports /compat or /usr/compat/*** directory/file is not available.

It is a new installation of FreeBSD9-RELEASE, so there are no remnants from a previous installation.

Enabled linux in loader.conf and also added necessary lines in /etc/fstab, yet no go. 


```
%ls /
COPYRIGHT	entropy		libexec		rescue		tmp
bin		etc		media		root		usr
boot		home		mnt		sbin		var
dev		lib		proc		sys
```


```
%ls /usr
bin	home	lib	libdata	local	ports	share
games	include	lib32	libexec	obj	sbin	src
```

Do I need to create manually the directories?


----------



## Disturbo (Dec 2, 2012)

I followed this guide to installing htop on FreeBSD 9 RELEASE, and it's working fine.


----------

