sam lars
I'm looking for something like the services.msc in Windows, where I could view everything in /etc/init.d and see if it's running or stopped. At the very least, is there a command that can find if one of those programs is started or not?
vmc
If you open a terminal and use the 'top' command.
What that be what your looking for?
Saturday, June 21, 2008
Enable concurrent booting (Ubuntu)
Concurrent booting takes advantage of dual-core processors and CPUs that feature hyperthreading. To set this up, edit the “rc” file in the /etc/init.d directory:
sudo mousepad /etc/init.d/rc
Find the line that says CONCURRENCY=none and change it to:
CONCURRENCY=shell
Save the file.
There are many more Ubuntu tweaks out there. I’ve included links to the source of most of the information here. Many of the articles below include other tweaks that seemed a bit too risky to try. Always exercise caution when editing configuration files.
warning:- untested
i386 or i686 (ubuntu)
sulekha
I have a got p4 machine at office so what ubuntu iso image should i use i386 or i686 for making an install C.D ????
vmelkon
686, Everything after the original Pentium and K5 is considered a 686
indygunfreak
If I recall, Ubuntu doesn't have 686 isos, it has x86 isos. Are you confusing ubuntu isos with possibly mandriva or suse?
i386 will be the best for most users.
I have a got p4 machine at office so what ubuntu iso image should i use i386 or i686 for making an install C.D ????
vmelkon
686, Everything after the original Pentium and K5 is considered a 686
indygunfreak
If I recall, Ubuntu doesn't have 686 isos, it has x86 isos. Are you confusing ubuntu isos with possibly mandriva or suse?
i386 will be the best for most users.
core files
sulekha
recently i read in a book delete all core files with rm because they are a waste of space.
when i searched for core files as follows:-
find / -name core
find: /etc/lvm/archive: Permission denied
find: /etc/lvm/backup: Permission denied
find: /etc/ssl/private: Permission denied
find: /etc/cups/ssl: Permission denied
find: /etc/firestarter/inbound: Permission denied
find: /etc/firestarter/outbound: Permission denied
find: /var/lib/cups/certs: Permission denied
find: /var/lib/gdm: Permission denied
find: /var/lib/slocate: Permission denied
find: /var/lib/fetchmail: Permission denied
find: /var/cache/setup-tool-backends/debug: Permission denied
find: /var/cache/setup-tool-backends/backup: Permission denied
find: /var/lock/lvm: Permission denied
find: /var/log/squid: Permission denied
find: /var/run/sudo: Permission denied
find: /var/spool/cron/crontabs: Permission denied
macemoneta
Quote:
there is quite a large no: of core files,from this listing how will i know which are the files to be deleted??? I don't think all these files are created as a result of program crash.
First, there were only 12 'core' files. None of them were files you should delete. Most distributions these days disable the creation of core files so there shouldn't be any unless you specifically enable them.
code
$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
max nice (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 8185
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
max rt priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 8185
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
If you want to search the entire system, you need to do that as root. That's why you received the "permission denied" messages; as a user you don't have access to those directories.
wjevans_71
Actually, there isn't much evidence of core files there.
The "permission denied" messages are telling you that you don't have the rights to look in the named directory to check for core files or for anything else. Run the find command as root, and you'll get rid of these messages.
The other lines are most likely special case files which are not core dumps, and should be left alone.
jerrill
From what I understand a core dump happens when the kernel has a significant fault, usually causing the computer to crash. When you reboot, the file would be in your home directory.
bouncer
Quote:
From what I understand a core dump happens when the kernel has a significant fault, usually causing the computer to crash. When you reboot, the file would be in your home directory.
Any app can create a core file when it crashes.
Using (s)locate is faster than find, provided that you have upgraded your (s)locate database (updatedb as root, locate as regular user):
Code:
updatedb
then find
Code:
locate core
anyway like said, you should not have core files there.
As a sidenote, when posting, don't post that excessive outputs. If you need to post an output from some program, cut it and paste only the important parts (we don't need those lines that say you don't have permissions into some directory in this case).
sulekha
I searched for core files in my home directory. i didn't find any.
can any one give features/properties of core files so that i can quickly find them using find command.??
macemoneta
They are named 'core'. If they are from an application that you ran, they will be in your home directory. Did you run the ulimit command above? Are core files even enabled on your system?
wjevans_71
Quoth jerril:
Quote:
From what I understand a core dump happens when the kernel has a significant fault, usually causing the computer to crash.
A core dump (in the current context) happens when the kernel has found a significant fault in a running program, always causing the program to stop running. The system as a whole keeps running merrily.
And.
Quoth jerril:
Quote:
the file would be in your home directory
Quoth macemoneta:
Quote:
If they are from an application that you ran, they will be in your home directory.
No, guys. When an application dies and leaves a core file, it is in whatever directory was the process's current directory when the application died, which is usually the process's current directory when the application started, but not necessarily the user's home directory.
macemoneta
Unless a user is root, the home directory and /tmp are the only directories that a user (normally) has write access to. A core file will not be created in a directory that the user process cannot write to.
wjevans_71
Quoth the highly esteemed macemoneta:
Quote:
A core file will not be created in a directory that the user process cannot write to.
Quite correct, as far as it goes. But the following is a bit shy of the mark:
Quote:
Unless a user is root, the home directory and /tmp are the only directories that a user (normally) has write access to.
Most developers I know, and most others I know who are not developers, will not keep their files directly in their home directories, but will create subdirectories so their files are a bit more organized. This provides far more directories than the two you mentioned. If any one of them is the current working directory, that is where any core file will go.
jiliagre
Quote:
Originally Posted by macemoneta
Unless a user is root, the home directory and /tmp are the only directories that a user (normally) has write access to.
Actually quite a few more can be found under /var (/var/tmp, /var/preserve, /var/mail, /var/spool/.../, ...)
Quote:
A core file will not be created in a directory that the user process cannot write to.
Correct. However don't forget a process may have higher privileges that the user who launched it if its suid and/or sgid bits are set. The user won't be able to remove a core file created under that situation though.
recently i read in a book delete all core files with rm because they are a waste of space.
when i searched for core files as follows:-
find / -name core
find: /etc/lvm/archive: Permission denied
find: /etc/lvm/backup: Permission denied
find: /etc/ssl/private: Permission denied
find: /etc/cups/ssl: Permission denied
find: /etc/firestarter/inbound: Permission denied
find: /etc/firestarter/outbound: Permission denied
find: /var/lib/cups/certs: Permission denied
find: /var/lib/gdm: Permission denied
find: /var/lib/slocate: Permission denied
find: /var/lib/fetchmail: Permission denied
find: /var/cache/setup-tool-backends/debug: Permission denied
find: /var/cache/setup-tool-backends/backup: Permission denied
find: /var/lock/lvm: Permission denied
find: /var/log/squid: Permission denied
find: /var/run/sudo: Permission denied
find: /var/spool/cron/crontabs: Permission denied
macemoneta
Quote:
there is quite a large no: of core files,from this listing how will i know which are the files to be deleted??? I don't think all these files are created as a result of program crash.
First, there were only 12 'core' files. None of them were files you should delete. Most distributions these days disable the creation of core files so there shouldn't be any unless you specifically enable them.
code
$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
max nice (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 8185
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
max rt priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 8185
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
If you want to search the entire system, you need to do that as root. That's why you received the "permission denied" messages; as a user you don't have access to those directories.
wjevans_71
Actually, there isn't much evidence of core files there.
The "permission denied" messages are telling you that you don't have the rights to look in the named directory to check for core files or for anything else. Run the find command as root, and you'll get rid of these messages.
The other lines are most likely special case files which are not core dumps, and should be left alone.
jerrill
From what I understand a core dump happens when the kernel has a significant fault, usually causing the computer to crash. When you reboot, the file would be in your home directory.
bouncer
Quote:
From what I understand a core dump happens when the kernel has a significant fault, usually causing the computer to crash. When you reboot, the file would be in your home directory.
Any app can create a core file when it crashes.
Using (s)locate is faster than find, provided that you have upgraded your (s)locate database (updatedb as root, locate as regular user):
Code:
updatedb
then find
Code:
locate core
anyway like said, you should not have core files there.
As a sidenote, when posting, don't post that excessive outputs. If you need to post an output from some program, cut it and paste only the important parts (we don't need those lines that say you don't have permissions into some directory in this case).
sulekha
I searched for core files in my home directory. i didn't find any.
can any one give features/properties of core files so that i can quickly find them using find command.??
macemoneta
They are named 'core'. If they are from an application that you ran, they will be in your home directory. Did you run the ulimit command above? Are core files even enabled on your system?
wjevans_71
Quoth jerril:
Quote:
From what I understand a core dump happens when the kernel has a significant fault, usually causing the computer to crash.
A core dump (in the current context) happens when the kernel has found a significant fault in a running program, always causing the program to stop running. The system as a whole keeps running merrily.
And.
Quoth jerril:
Quote:
the file would be in your home directory
Quoth macemoneta:
Quote:
If they are from an application that you ran, they will be in your home directory.
No, guys. When an application dies and leaves a core file, it is in whatever directory was the process's current directory when the application died, which is usually the process's current directory when the application started, but not necessarily the user's home directory.
macemoneta
Unless a user is root, the home directory and /tmp are the only directories that a user (normally) has write access to. A core file will not be created in a directory that the user process cannot write to.
wjevans_71
Quoth the highly esteemed macemoneta:
Quote:
A core file will not be created in a directory that the user process cannot write to.
Quite correct, as far as it goes. But the following is a bit shy of the mark:
Quote:
Unless a user is root, the home directory and /tmp are the only directories that a user (normally) has write access to.
Most developers I know, and most others I know who are not developers, will not keep their files directly in their home directories, but will create subdirectories so their files are a bit more organized. This provides far more directories than the two you mentioned. If any one of them is the current working directory, that is where any core file will go.
jiliagre
Quote:
Originally Posted by macemoneta
Unless a user is root, the home directory and /tmp are the only directories that a user (normally) has write access to.
Actually quite a few more can be found under /var (/var/tmp, /var/preserve, /var/mail, /var/spool/.../, ...)
Quote:
A core file will not be created in a directory that the user process cannot write to.
Correct. However don't forget a process may have higher privileges that the user who launched it if its suid and/or sgid bits are set. The user won't be able to remove a core file created under that situation though.
command line CD writing in ubuntu
"how to" on CD writing in command mode (ubuntu specific)?
Burning a CD or DVD using Command Line tools
This section details the use of the command line(terminal) to burn either a CD or DVD disk.
Creating an ISO image
A command called mkisofs can make an .ISO image to be burned or mounted.
*
mkisofs -r -J -o cd_image.iso /directory
The -r and -J ensures long file names work for Unix (using Rock Ridge) and Windows (using Joliet extensions) respectively.
Checking CD Images Before Burning
It's possible to check CD images before burning. The easiest way is to simply double-click on it from the file browser, which will load the image into Archive Manage (file-roller).
* If you have sudo access, you can also mount the image, and explore its contents {{{sudo modprobe loop
sudo mount -t iso9660 -o ro,loop=/dev/loop0 cd_image.iso /media/cdrom }}}
* Remember to unmount an image after checking:
sudo umount /media/cdrom
Burning a CD on the Command Line with cdrecord
cdrecord can burn an ISO(.iso) disk image or other data onto a CD. To burn a data CD (using image prepared earlier):
*
cdrecord dev=/dev/cdrom driveropts=burnfree -v -data cd_image.iso
To burn an audio cd from wav files:
cdrecord dev=/dev/cdrom driveropts=burnfree -v -audio [wav files...]
Replace /dev/cdrom as needed if this is not your CD-Writer
-v (verbose) lets you track the recording progress
driveropts=burnfree helps reduce the risk of a buffer under-run (most drives should support this)
Blanking a CD/RW
To reuse a rewritable CD or DVD you first need to 'blank' the disk. This erases the old data and prepares the disk for new data.
*cdrecord -vv dev=1,0 blank=all
cdrecord -v gracetime=2 dev=/dev/cdrom -eject blank=fast -force
see http://lists.debian.org/cdwrite/2004/10/msg00031.html
Using cdrecord on "unsupported" drives
Sometimes Ubuntu fails to detect and configure your Burner. This results in "no media found" if you use 'cdrecord dev=/dev/cdrom'. Even 'cdrecord -scanbus' does not work - so you just don't know, how to address the drive. You can work around this by looking into the boot messages with dmesg, to identify the devicepath to your burner. F.e.
*
$ dmesg
hda: PIONEER DVD RW DVR-108, ATAPI CD/DVD-ROM drive
hdb: IDE DVD-ROM 16X, ATAPI CD/DVD-ROM drive
[...]
hda: ATAPI 40X DVD-ROM DVD-R CD-R/RW drive, 2000kB Cache
Ok so we know, it is hda. Now you can burn on this drive using:
cdrecord dev=ATAPI:/dev/hda -data -v -eject your_data.iso
Burning a DVD or Blu-Ray Disc
*
Install the dvd+rw-tools package. See [InstallingSoftware].
*
Use the packages growisofs application to burn a DVD or Blu-Ray disc.
growisofs -Z /dev/scd0 -R -J /some/files
growisofs -speed=2 -dvd-compat -Z /dev/dvd=dvd_image.iso
Add additional sessions by using
*
growisofs -M /dev/dvdwriter additionaldata
Blanking DVD+RW discs
dvd+rw-format -blank /dev/cdrw
see:-
https://help.ubuntu.com/community/CdDvdBurning
https://help.ubuntu.com/community/CdDvd/Burning#Burning%20a%20CD%20or%20DVD%20using%20Command%20Line%20tools
Burning a CD or DVD using Command Line tools
This section details the use of the command line(terminal) to burn either a CD or DVD disk.
Creating an ISO image
A command called mkisofs can make an .ISO image to be burned or mounted.
*
mkisofs -r -J -o cd_image.iso /directory
The -r and -J ensures long file names work for Unix (using Rock Ridge) and Windows (using Joliet extensions) respectively.
Checking CD Images Before Burning
It's possible to check CD images before burning. The easiest way is to simply double-click on it from the file browser, which will load the image into Archive Manage (file-roller).
* If you have sudo access, you can also mount the image, and explore its contents {{{sudo modprobe loop
sudo mount -t iso9660 -o ro,loop=/dev/loop0 cd_image.iso /media/cdrom }}}
* Remember to unmount an image after checking:
sudo umount /media/cdrom
Burning a CD on the Command Line with cdrecord
cdrecord can burn an ISO(.iso) disk image or other data onto a CD. To burn a data CD (using image prepared earlier):
*
cdrecord dev=/dev/cdrom driveropts=burnfree -v -data cd_image.iso
To burn an audio cd from wav files:
cdrecord dev=/dev/cdrom driveropts=burnfree -v -audio [wav files...]
Replace /dev/cdrom as needed if this is not your CD-Writer
-v (verbose) lets you track the recording progress
driveropts=burnfree helps reduce the risk of a buffer under-run (most drives should support this)
Blanking a CD/RW
To reuse a rewritable CD or DVD you first need to 'blank' the disk. This erases the old data and prepares the disk for new data.
*cdrecord -vv dev=1,0 blank=all
cdrecord -v gracetime=2 dev=/dev/cdrom -eject blank=fast -force
see http://lists.debian.org/cdwrite/2004/10/msg00031.html
Using cdrecord on "unsupported" drives
Sometimes Ubuntu fails to detect and configure your Burner. This results in "no media found" if you use 'cdrecord dev=/dev/cdrom'. Even 'cdrecord -scanbus' does not work - so you just don't know, how to address the drive. You can work around this by looking into the boot messages with dmesg, to identify the devicepath to your burner. F.e.
*
$ dmesg
hda: PIONEER DVD RW DVR-108, ATAPI CD/DVD-ROM drive
hdb: IDE DVD-ROM 16X, ATAPI CD/DVD-ROM drive
[...]
hda: ATAPI 40X DVD-ROM DVD-R CD-R/RW drive, 2000kB Cache
Ok so we know, it is hda. Now you can burn on this drive using:
cdrecord dev=ATAPI:/dev/hda -data -v -eject your_data.iso
Burning a DVD or Blu-Ray Disc
*
Install the dvd+rw-tools package. See [InstallingSoftware].
*
Use the packages growisofs application to burn a DVD or Blu-Ray disc.
growisofs -Z /dev/scd0 -R -J /some/files
growisofs -speed=2 -dvd-compat -Z /dev/dvd=dvd_image.iso
Add additional sessions by using
*
growisofs -M /dev/dvdwriter additionaldata
Blanking DVD+RW discs
dvd+rw-format -blank /dev/cdrw
see:-
https://help.ubuntu.com/community/CdDvdBurning
https://help.ubuntu.com/community/CdDvd/Burning#Burning%20a%20CD%20or%20DVD%20using%20Command%20Line%20tools
Free up more memory (ubuntu)
we’re going to free up RAM by disabling some virtual consoles that use up memory—even though most people never use them. To do that, we need to edit the inittab file in the etc directory. In the terminal, type:
sudo gedit /etc/inittab
This will again call up the text editor, this time with inittab loaded.
Scroll down until you find the six lines that begin with:
1:2345:respawn:/sbin/getty 38400 tty1

N.B:- tested on dapper
see:- http://www.chinwong.com/index.php/site/article/ubuntu_speed_up_tips/
sudo gedit /etc/inittab
This will again call up the text editor, this time with inittab loaded.
Scroll down until you find the six lines that begin with:
1:2345:respawn:/sbin/getty 38400 tty1

N.B:- tested on dapper
see:- http://www.chinwong.com/index.php/site/article/ubuntu_speed_up_tips/
Subscribe to:
Posts (Atom)