Linux HOWTOs

About | Home | Search


HOWTO: psmisc
Description: Utilities that use the /proc fs: fuser, killall, pstree, pidof, peekfd
Click here for ChangeLog
NOTE: I use GNU tar >= 1.13.25 so it's -j for .tar.bz2 files,
it's safe to assume that make, gcc, binutils, fileutils/coreutils, gawk, sed, and grep are prerequisites for almost everything


# psmisc 22.14
# ============
# Slack bundles procps, psmisc, and procinfo together in the 'procps'
# package.  If you're replacing it with the source versions of each one,
# run through each howto in that order.

# Slackware 12.1, 12.2, 13.0, 13.1: procps 3.2.7 (includes psmisc 22.3)
# Slackware 13.37: procps 3.2.8 (includes psmisc 22.13)

# Prerequisites:
# termcap
# gettext

# With an older libc (like the one that Slackware 7.1 comes with), pass
# --disable-ipv6 to configure to avoid IPv6 related errors with building
# fuser.  ...or grab the older psmisc from sunsite/metalab/ibiblio.
# I would also suggest also putting "LIBS=-lintl" at the beginning of your
# configure line.

cd
test -f installed/psmisc-22.14.tar.gz && mv installed/psmisc-22.14.tar.gz .
test ! -f psmisc-22.14.tar.gz &&
 wget http://download.sf.net/psmisc/psmisc-22.14.tar.gz
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "psmisc-*" -exec rm -r {} \;
tar xzvf ~/psmisc-22.14.tar.gz
cd psmisc-22.14
test $UID = 0 && chown -R root:root .

# Configure and build it
./configure --prefix=/usr --mandir=/usr/man --disable-nls
make

# Become root to install it
su

# This is from older Slackware procps packages
rm -f /usr/bin/pstree.x11

# Install it
make install
ln -sf /usr/bin/fuser /bin/fuser
ln -sf /usr/bin/killall /bin/killall
ln -sf /usr/bin/killall /sbin/pidof

# Make sure your non-root user can remove the source later
chown -R $USER .
chmod -R u+rw .

# Become yourself again
exit

cd
mkdir -p -m 0700 installed
rm -f installed/psmisc-*.tar.*
mv psmisc-22.14.tar.gz installed/


# If you ever want to uninstall psmisc, this should do it:
cd
su
test -d src/psmisc-* && ( cd src/psmisc-* ; make uninstall )
( cd /usr/bin
  rm -f fuser killall oldfuser pstree pstree.x11 prtstat peekfd )
( cd /usr/man/man1 ; rm -f fuser.1 killall.1 peekfd.1 prtstat.1 pstree.1 )
find /usr/share/locale -type f -name "psmisc.mo" -exec rm {} \; 2> /dev/null
( cd /usr/share/man/man1
  rm -f fuser.1 killall.1 peekfd.1 prtstat.1 pstree.1 )
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "psmisc-*" -exec rm -r {} \;
rm -f ~/installed/psmisc-*.tar.*

Back to the list


Last updated: Tue, 07 Aug 2018 12:06:17 -0400
Jason Englander <jason at englanders dot us>