Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need info about slibclean command

Status
Not open for further replies.

tech123786

Technical User
Nov 13, 2006
31
US
hello,
I was told by my application team to run slibclean command on regular basis to clean some of the shared libraries which resides in memory. I was wondering if we use this command , will there be any consequences in kernel or in system performance?
How often we can run this command to clear the shared objects? What are the pros and cons. Any suggestions?


Thanks
 
Code:
The slibclean command can be used by the root user to unload all shared
objects with a use count value of zero from the system shared library segment.

Code:
This command is useful in an environment when shared libraries are under
development. You can run the slibclean command followed by the genkld
command to ensure that the shared objects under development are not loaded in
the system shared library segment. This means that any application started after
this will automatically use the latest version of the shared objects since the
system loader will search for and load them. It also prevents multiple versions of
the same objects existing in the system segment.

During the development of shared objects, you may sometimes see an error
message similar to the following when creating a new version of an existing
shared object:
# make libone.so
cc -O -c source1.c
cc -berok -G -o libone.so source1.o
ld: 0711-851 SEVERE ERROR: Output file: libone.so
The file is in use and cannot be overwritten.
make: 1254-004 The error code from the last command is 12.
The error message means that the target shared object file is in use and it has
been loaded into the system shared library segment. Once loaded, the file is
marked as in use, even if the use count is already zero. Running the slibclean
command will unload all of the unused shared objects from the system. An
alternative (and simpler) method of avoiding this problem is to use the rm -f
command to remove the shared object before creating it.

Code:
However, frequent slibclean invocation on production systems should be
avoided, because it may affect the system performance by unloading frequently
used, but unused when the command is issued, shared objects and libraries on
the system. It is recommended to issue slibclean on production systems that
92 Developing and Porting C and C++ Applications on AIX
are in a software maintenance phase, especially before the deinstallation of no
longer required applications or the updating of installed applications.

I found this in this link:


More links:




Regards,
Khalid
 
Opps Try avoid reading this line in the last quote
"92 Developing and Porting C and C++ Applications on AIX"

It is refering to the page and chapter name!

Copying mistake :)

Regards,
Khalid
 
Thanks Khalidaa for the info, earlier I have gone through the IBM link that you have provided , but I wanted to know whether any one in this forum got a chance to use this command and their suggetions in practial.
 
Oh I'm sorry if that didn't help much!

To be honest i never tried that command! I just thought of sharing the link

I hope you get more helpful tips soon

Regards,
Khalid
 
I use that command regularly when upgrading one of our applications. As far as I can see it just releases some files from the apps control and enables us to overwrite with a new version of the programs involved.

I want to be good, is that not enough?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top