October 25, 2008

Ask Linux.com: Missing memory, built-in webcams, and shared servers

Author: Linux.com Staff

This week in our whirlwind tour of the Linux.com forums: demystifying your notebook's built-in webcam, demystifying the varying states of system RAM, and demystifying the ins and outs of running a shared server. Plus a country-sized portion of re-mystifying unanswered questions, and the debut of a new feature so strange and different from the usual Ask Linux.com fare that we'd have to call it, well, mystifying.

If you love your memory, set it free?

Konerak wrote in to the Applications forum to ask for help diagnosing a potential memory leak in his office's new Linux server. "Recently I've began noticing that the amount of free memory (as seen by the command "free" or "free -m") is always decreasing, but never goes under a 100M.... Now, funny thing is, when I copy a large file (2GB) and 'sudo vi' it, the system starts responding slowly (as expected), the process uses a lot of memory (as expected) and sometimes even swap is used (as expected). But when I then terminate the vi-session, I "gain" free memory: where I used to have 100MB free left, I now have 2GB again."

Khabi was quick to pose a solution: Konerak was only keeping track of memory marked as free by the free -m command. Instead, he should track both memory marked as free and memory marked as cached.

Cached memory is available to the system should the need arise, but is not automatically cleared. Keeping the cached memory around, Khabi explained, is a strategy Linux uses to speed up repeated access. He explained how to force the kernel to drop the caches, but added that it wasn't necessary. Keeping the cache in place is an optimization.

Smile, you're on built-in camera

Kithsiri asked for help with a common hardware sticking point: how to find and configure the right driver for his laptop's built-in webcam. The model in question was a Lenovo 3000 N100, but as is often the case with the increased proliferation of notebook webcams, the precise spec of the camera were hard to uncover.

First, Khabi explained how to use lsusb to read everything the system could tell about the webcam and other built-in hardware. Reed found a relevant page on the Ubuntu Laptop Testing Team's wiki that had more detail, including which chip set the camera uses, and links to the project working on the driver.

There are a lot of low-cost webcam modules out there, so finding the right information and driver can require some hunting. Luckily, the odds are that you are far from the first to need Linux support, so there is almost always someone who can point you in the right direction.

Unanswered questions at unbeatable low prices

Tired of definite answers? You've come to the right place!

User cmarkle has a question for those in the Programming and Development forum. He's writing an app that runs early in the init process, before syslogd has started, and he needs to find a way to log data from it. Log your ideas here.

Regular contributor PerlCoder needs help with upgrades. He is soon leaving behind a job managing an Ubuntu box in a computer lab. Between his departure and whenever the next Linux-literate employee arrives, he'd like to make sure the machine still gets important software updates. He tried it with aptitude and crontab, to no avail. You can update his thinking here.

Mohit Sharma has more data than he can handle. His server uses seven terabytes (you read that right, 7TB) of storage on an ext3 filesystem. It's so much that searching for files the traditional way is unusably slow, and he is looking for a way to speed up the process. Search your soul and speed over here with your solution.

And now, all of the rules change ... forever

Finally, forget everything you ever thought you knew about Ask Linux.com, because a new era is about to begin. No longer will you be limited to just satisfactorily answered questions and tantalizingly unanswered questions -- now we're proud to introduce yet a third, never before seen feature: partially answered questions!

Specifically, a post containing both a helpful question resolved, and a good, solid secondary question still up in the air. It's from Mohit Sharma again, who asks how he can restrict Bittorrent usage on the server he manages, and how to log creation of extremely large files -- such as those over 1GB.

Khabi provided a good answer to the second question, pointing Sharma to fslint and our recent coverage. But he had no suggestions for the Bittorrent problem. Do you?

So that's it. In retrospect, perhaps partially answered questions aren't as earth-shattering as they seemed before the fact.

But there is still a lesson you can take away: stacking multiple questions into a single thread means one of them might get overlooked -- and we don't want that. If you've got a question, give the posting guidelines a once-over, then head to the forums and ask away.

Categories:

  • News
  • System Administration
  • Linux
  • Community
Click Here!