Reposted for posterity, sorry lost the source link…
echo "
# miniDLNA upstart script
#
# This task runs miniDLNA. it's currently a work in progress
description "miniDLNA start-up script"
author "Craig Chambers"
start on (net-device-up IFACE=eth0)
expect fork
respawn
exec /usr/local/sbin/minidlna -f /etc/minidlna.conf
" > /etc/init/minidlna.conf
September 10th, 2009
Glenn
Ubuntu 9.04 bug with networking directory creation « RimuHosting Blog.
I ran ifup and got the following errors
root@charon ~ # ifup eth0
ifup: failed to open statefile /var/run/network/ifstate: No such file or directory
… so i checked and /var/run/network did not exist… This link had a bit more technical information. They said look for the following files and remove them.
/etc/udev/rules.d/85-ifupdown.rules
/lib/udev/rules.d/85-ifupdown.rules
A good solution to a tricky issue after an major upgrade.
While I am a big fan of Ubuntu and I use it regularly on my desktop, its fair to say that I prefer not to use it for server installations. The same things goes for Fedora. Actually just don’t use Fedora
. Silly bugs like those above are one of the reasons.
If I had to make a recommendation, it would be for Debian stable or CentOS/RHEL. Both are reasonably easy to use, with great community support. And I find they have a much more more consistent toolchain so that things are less likely to break and are better testing before getting into production systems. Keeping in mind this is for a server.
Mind you, no distro is 100% perfect, and some needs will differ. All YMMV and IMHO
Free is a command line interface (CLI) tool available on most Linux and Unix based systems. From the man page…
… displays the total amount of free and used physical and swap memory in the system, as well as the buffers used by the kernel.”
Running free, you get output similar to the following (by default the numbers are in kilobytes)…
1
2
3
4
5
| :~$ free
total used free shared buffers cached
Mem: 3992680 3033116 959564 0 272632 1754476
-/+ buffers/cache: 1006008 2986672
Swap: 979924 0 979924 |
The numbers are essentially counters representing how the RAM on your Linux system is allocated in bytes. By itself the above is not very readable, but the command comes with a few handy options to make it easier. You can pass it the ‘-m’ parameter to translates the counters to MB, the ‘b’ option does the same in bytes.
1
2
3
4
5
| :~$ free -m
total used free shared buffers cached
Mem: 3899 2963 935 0 266 1713
-/+ buffers/cache: 984 2914
Swap: 956 0 956 |
The first line shows overall usage of the total memory usage on your system. Including any file-system and other caches reserved by the kernel. Since RAM is faster the OS will always try to take advantage of that resource by using it to its fullest. But in practice most of that can be released quite quickly for applications that need more space.
So how can we see how much memory us really being used by the applications on your server? The ‘-/+ buffers’ line shows how much of the actual RAM is in use by applications while the last line shows how much of your slower disk based virtual memory is in use.
Sometimes a PC will start to run relatively slowly, for example when it is running a busy web server. By checking free you will likely see the used column of the last two lines starting to approach the total value. Which is bad for performance and you run the risk of the kernel killing low priority processes to release memory for new tasks.
There are lots of great guides available about optimising memory usage, especially in a server environment. One that I have found handy is on the Rimuhosting.com site. There is also an incredibly extensive but more general page at Linux Troubleshooting with some handy tips. Lots more can be found on Google.
To upgrade in place for releases that are no longer officially supported please see…
http://www.nzlinux.com/2009/06/upgrading-older-releases-of-ubuntu-when-support-ends/
Depending on the installation it might be substantially faster to do a clean reinstall and migrate your content from backups. YMMV.
If you are already on one of the LTS releases then there should be a safe upgrade path available per https://help.ubuntu.com/community/UpgradeNotes