Show All SLP Services in Linux
The Problem
Back in the good old days of NetWare, if you wanted to see all registered services in SLP, you’d simply type: display slp services
and the full list would appear on your screen.
Fast forward to Linux and OpenSLP and you can't do that very easily. Using a combination of slptool switches, you can eventually get all the same information, but it is cumbersome and time consuming.
The Fix
The following script was written to make that job simple and quick. It will write all the services to your screen and allow you to scroll up and down the list at will. It will also write the results to a file in the /tmp directory so you can look at it again without having to run the script. This also allows you to quickly grab the results from multiple computers for comparison.
Just copy your script to each server you'd like to run it on. I recommend putting it somewhere in the path, such as /usr/local/bin. Then, you make the script executable (chmod +x ./slpshowall.sh) and you are ready to run it.
slpshowall.sh
Comments
Handy tool, and just what I was looking for right now.
Thanks!
for srvtype in $(slptool findsrvtypes); do
slptool findsrvs $srvtype; done
John, this is not really a bug in the slptool but more an inconsistency in how NetWare and OES Linux announce their services. The “service:” services come from a Linux box and the ones without should come from a NetWare box. So you can’t just eliminate the ones you don’t like.
For a more sophisticated version of the script go here: http://www.novell.com/communities/node/11292/slp-snoop-linux-and-windows . Included is a script called “slpsnoop.sh” which runs on Linux and Windows.
Hi, vindiola
I found, that on OES2SP2 with all Patches (2010-08-12) sometime the command “slptool findsrvtypes”
show the “bindery.novell” twice, so the total count is not valid, see the listing below
I recreate the script to fix this,create a achive of slp listings amd also use the hits of thorsten kampe, please test this script
Regards Lutz
This is a listing with wrong service list “service:” (novell bug?)
service:smb
service:remotedesktop.kde:vnc
service:remotedesktop.java:http
service:ssh
service:fish
service:ntp
service:smdr.novell
service:domain
service:ldap
service:bindery.novell
service:ndap.novell
nwserver.novell
portal.novell
securerconsole.novell
rconsole.novell
bindery.novell
smdr.novell
nlsmeter.novell
srs.novell
service:wbem:https
This is the script