Archive for the ‘Commands’ Category

I had a problem where one user could not print in BoardStation. The problem was that nothing happened when they went to print. It turned out to be a problem for me as well. I had one other user on a different computer that didn’t have this problem. So I made sure that all the same packages were installed on both computers and that the same settings were used. It didn’t matter, the ezprint window would not pop up in any BoardStation program.

After a day of messing around with things, I finally found the problem was in the setting of LD_LIBRARY_PATH. If I included the directory containing the library that specctra needed (/net/sw/cadence/spb/spb16.5/tools.lnx86/lib) then the print file wouldn’t appear. If I took that library out, the print window popped up without a problem.

Unfortunately, without that library, the specctra program would not run. And both of our engineers still use specctra for routing. So I wanted to get both programs working correctly at the same time.

The solution was to add /lib and /usr/lib to the beginning of the LD_LIBRARY_PATH environment variable. So now my LD_LIBRARY_PATH variable looks like this:

$ printenv LD_LIBRARY_PATH
/lib:/usr/lib:/net/sw/cadence/spb/spb16.5/tools.lnx86/lib:/usr/lib64/root:/net/sw/wxWidgets-2.8.12/x64/lib

and both programs work correctly.

I added a user to our ldap server and then realized that I’d made a mistake. So I quickly ran an ldapmodify command to fix my mistake. Unfortunately, I had already run a finger command on the new user, which is when I saw the mistake. After the ldapmodify command, I still saw the mistake, even though I knew that it had been fixed. This problem was due to running nscd on the computer. This handles the passwd and group lookups for running programs and caches the result for the next query. The problem was that I wanted to clear the cache. The solution was to stop nscd, run the finger command which went and got the updated info and then turn nscd back on. Then all was well.

We had to move our svn repo to a different server. The paths to the repo were the same, but they were being served from, say server2.example.com instead of server1.example.com. Use the switch –relocate options in svn to make this happen.

$ svn switch --relocate svn+ssh://user@server1/usr/local/repos/trac/test svn+ssh://user@server2/user/local/repos/trac/test

Edit /etc/sysconfig/rhn/sources and add the following:

### Dag RPM Repository for Red Hat Enterprise Linux
yum dag http://apt.sw.be/redhat/el4/en/$ARCH/dag

Now can get perl modules here instead of from cpan (which causes me a lot of problems for some reason).

[root@server ~]$ up2date perl-IO-Socket-SSL

I had to reinstall a computer with XP. It would boot off the cd ok, but then after the “Setup is inspecting your computer’s hardware configuration” message came up, it wouldn’t do anything. It was just a blank screen. I ran memtest to check the memory and it all came up clean. I did notice that the light for hard drive activity would be constantly lit when the screen was blank. However, I had no problem at all in installing linux on this computer. So, I used a live cd of Damn Small Linux (DSL) to boot. Then I ran the following command:

# sudo fdisk /dev/hda

The number of cylinders for this disk is set to 9729.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): o
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

Command (m for help): w

After this, the windows installation worked fine.

Go to System Preferences -> International -> Input Menu and make sure “Show input menu in menu bar” is checked. This will put a little flag in your menu bar.

charpalette.png

Then click on your flag and select “Show Character Palette”. Then just click on the symbol you want and then click “Insert”. Here’s the angstrom symbol: Ã…

You can see a list of special characters in windows by running Start -> Run -> charmap.

charmap.png

Then, just double-click the character you want and click copy. You should then be able to paste the character into your document.

As an example, I’ll paste the angstrom symbol here: Ã…

Trying to run yum -y upgrade, gave the following errors:

(snip)
--> Finished Dependency Resolution
perl-DBD-mysql-4.010-1.el4.rf.i386 from dag has depsolving problems
  --> Missing Dependency: libmysqlclient.so.14 is needed by package perl-DBD-mysql-4.010-1.el4.rf.i386 (dag)
perl-DBD-mysql-4.010-1.el4.rf.i386 from dag has depsolving problems
  --> Missing Dependency: libmysqlclient.so.14(libmysqlclient_14) is needed by package perl-DBD-mysql-4.010-1.el4.rf.i386 (dag)
subversion-1.4.6-0.1.el4.rf.i386 from dag has depsolving problems
  --> Missing Dependency: libapr-0.so.0 is needed by package subversion-1.4.6-0.1.el4.rf.i386 (dag)
subversion-1.4.6-0.1.el4.rf.i386 from dag has depsolving problems
  --> Missing Dependency: libneon.so.24 is needed by package subversion-1.4.6-0.1.el4.rf.i386 (dag)
1:nfs-utils-1.0.9-40.el5.i386 from installed has depsolving problems
  --> Missing Dependency: libevent-1.1a.so.1 is needed by package 1:nfs-utils-1.0.9-40.el5.i386 (installed)
subversion-1.4.6-0.1.el4.rf.i386 from dag has depsolving problems
  --> Missing Dependency: libaprutil-0.so.0 is needed by package subversion-1.4.6-0.1.el4.rf.i386 (dag)
Error: Missing Dependency: libmysqlclient.so.14 is needed by package perl-DBD-mysql-4.010-1.el4.rf.i386 (dag)
Error: Missing Dependency: libneon.so.24 is needed by package subversion-1.4.6-0.1.el4.rf.i386 (dag)
Error: Missing Dependency: libaprutil-0.so.0 is needed by package subversion-1.4.6-0.1.el4.rf.i386 (dag)
Error: Missing Dependency: libevent-1.1a.so.1 is needed by package 1:nfs-utils-1.0.9-40.el5.i386 (installed)
Error: Missing Dependency: libmysqlclient.so.14(libmysqlclient_14) is needed by package perl-DBD-mysql-4.010-1.el4.rf.i386 (dag)
Error: Missing Dependency: libapr-0.so.0 is needed by package subversion-1.4.6-0.1.el4.rf.i386 (dag)

These all seemed to be problems from the dag repo that I used to get the perl cpan modules. To fix, do the following:

cd /etc/yum.repos.d
mkdir save
mv dag.repo save
yum -y upgrade  (now runs successfully)
mv save/dag.repo .
rmdir save

Tools to use to monitor website traffic and bandwidth usage are webalizer and mrtg, respectively. Webalizer is quite easy to set up, just edit /etc/webalizer.conf to tell it where to write files. I also made those files only accessible to our subnet. And then run a daily cron job to generate the files.

I’m still setting up mrtg and will put my notes up as soon as it’s done.

I have a few computers that kept showing up as “Not Checking In”, in my Redhat profile. However, if I logged on to those computers and run up2date everything would work fine. The problem was in the rhnsd. Once I restarted that and killed any other rhn things running, the system would checkin, on its own, within two hours.