Best of Technical Support

Our experts answer your technical questions.
Shells and a.out vs. ELF

I think they are somewhat similar so I'll group my questions:

How can I tell if I have a.out binaries on my system? Any mention of these suggest them to be an old format. Is there anything still around that I'm likely to be using that requires a.out support in the kernel?

Also, how can I tell which shell(s) I need on my system? It seems several get installed, but I'd be happy to stick to just one. Do I need to scan for scripts that may use something other than the default shell? If so, could someone suggest an appropriate scan script to demonstrate “The Power” to a newbie, please?

Perhaps the savings are modest for each of these, but so are the resources for my foray into the Linux world! —Barry Johnson, barryjj@ibm.net

To search for a.out binaries, type:

find / -mode +400 -exec file {}\; | grep MAGIC

The find command looks for files with the executable bit set. file prints what they are and grep extracts a.out files (identified as either ZMAGIC or NMAGIC or similar strings. System scripts use only /bin/sh (no csh, zsh or other shell). On the other hand, some scripts may be written in other languages, and their interpreter is sometimes called shell. These dependencies, however, are managed by your packaging system. If you are curious, repeat the find command line looking for —Alessandro Rubini, alessandro.rubini@prosa.it

On the first question: typing file progname will tell you whether progname is ELF or a.out.

Listing 1

As for the second, Listing 1 is a short Perl script that prints the shell and file name of all executable shell scripts on your system. Run it as root. The shells are printed first so that you can pipe the script's output through sort to sort the results by shell; this helps you quickly skip past the shells you decide to keep. It will take some time to run and probably will produce a great deal of output, so you should redirect the output to a file. —Scott Maxwell, s-max@pacbell.net

Paging or Performance Questions

This is my first Linux system and I'm having trouble tracking down some information. Maybe you can help me out or point me in the right direction.

1. I have Red Hat 5.2, Netscape 4.5 and cable internet access. My FTP throughput is excellent, but general browsing on the Internet is almost unbearable. My 9.6 modem could be faster (well, almost). It's kind of disappointing, compared to my NT system. Anyway, my first question: I hear regular disk activity, every five seconds or so. It's like some kind of paging is going on. What do you think is going on in the background? If I leave the PC alone for 15-20 seconds, it quiets down.

2. My second question is: while a web page is loading, I can start up top in an xterm window, move the window around and actually get faster downloads. I can't explain it. I can be sitting with a partially loaded page for 30 seconds, then bring up top and it's like Linux woke up and started updating the screen. —Daryle Dianis, ddianis@home.com

1. I take it this disk activity isn't linked to a cron job, but indeed to paging. A good way to make sure is to install and run procmeter; it can show you all kinds of activity meters, including disk activity and paging.

2. You don't give any details about your hardware, but it sounds like some kind of hardware and/or driver problem. Make sure you are running the latest version of X (3.3.3.1), and you don't have any interrupt conflicts. For example, you may have an interrupt configured for your video card (you don't need one) that conflicts with the interrupt of your network card. You can also try changing the interrupt of your network card. —Marc Merlin, marc@merlins.org

This may be a long shot, but do you have power management turned on? If your hard drive is spinning up and down, it might be producing this type of problem. Anything that represents more frequent activity (like top) that kept your drive from spinning down (or your CPU from slowing, etc.) would seem to speed up your computer.

An interesting thing to try would be to go into your BIOS at boot time and turn off all of your power management features. If that turns out to be helpful, you can turn it back on one feature at a time until you isolate the issue. —Chad Robinson, chadr@brt.com

______________________

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState