Front | Info | Lists | Newsfeeds | Study Guide | What is BSD? |
NetBSD sys_info
Jeremy C. Reed I was looking at new tools and commands introduced in recent NetBSD releases and saw a simple shell script, sys_info. This utility finds out the versions for several installed libraries, executables, and other system components, like tzdata. The script contains the list of components and on NetBSD 9, when ran it shows the versions of 40 components. To see all on NetBSD 8, run it with the -a switch. You can also use it to view details for specific components, as known to the script, for example:
$ sys_info release libc tzdata cc userland-NetBSD-9.0_STABLE/amd64 libc-12.213 tzdata-2020a gcc-7.4.0 To see the commands it runs to figure out the versioning, run it with the -v switch, for example:
$ sys_info -v ftpd + strings -a /usr/libexec/ftpd | awk '$1 == "NetBSD-ftpd" { print "ftpd-" $2 }' ftpd-20180428 The NetBSD 9 version includes options to find components in different locations: -d to set the base directory to look under an alternate install, such as a chroot directory; -L to set a colon-separated list of library directories; and -P to set a colon-separated executables path. I also ran it on FreeBSD where it had some failures, but did detect some versions. A similar tool for FreeBSD is in its ports collection: sysinfo.
DiscussionDiscuss this article below.
|
BSD Links · Advocacy· Drivers · Events · Flavours · FAQs · Guides · Programming · Security · Software · User Groups |