![]() |
|
cd /proc/megaide/0 e fare "cat status" |
|
uname -r |
|
ps -ef la colonna 'C' indica l'uso recente della cpu |
|
provate a scrivere "linux mediacheck ide=nodma" non appena parte il cd di installazione |
|
Modificare httpd.conf mettendo "AddDefaultCharset ISO-8859-1" invece del default che e' UTF-8. Inoltre verificare che il supporto per l'italiano e' supportato dal sistema (da x-windows fare add-package e vedere i language installati) |
|
Sempre che abbiate installato correttamente php, apache e i moduli
php-apache verificare che in http.conf vi sia:
AddType application/x-httpd-php .php .php3 .php5 |
|
Basta digitare il comando "locale" |
|
Editare il file /etc/inittab e inserire il runlevel preferito. Attenzione ai servizi che utilizzeranno /etc/rc.d/rc.RUNLEVEL |
|
Questo perche' in fedora core 4 c'e' il chroot sul named. Cosi' le zona vanno messe in /var/named/chroot/var/named |
|
Questo perche' per funzionare necessita semplicemente di "chkconfig vsftpd on" e del riavvio del sistema o di xinetd |
|
Cambiare le variabili di cui sotto che per default sono ad OFF in
php5 e poi riavviare http
|
|
scp ztclock [email protected]:/tmp/ |
|
In realta' non si installa di default. Fare un bel "yum install xinetd" e si risolve il problema |
|
Ecco i due valori: [root@asterisk zaptel-1.2.3]# hdparm -Tt /dev/hdc /dev/hdc: Timing cached reads: 1272 MB in 2.01 seconds = 634.19 MB/sec Timing buffered disk reads: 80 MB in 3.00 seconds = 26.65 MB/sec [root@asterisk zaptel-1.2.3]#
So, you've got your brand-new UltraATA/66 EIDE drive with a
screaming brand-new controller chipset that supports multiple
PIO modes and DMA and the leather seat option and extra
chrome... But is your system actually taking advantage of these
snazzy features? The Now before you get too excited, it is worth pointing out that under some circumstances, these commands CAN CAUSE UNEXPECTED DATA CORRUPTION! Use them at your own risk! At the very least, back up your box and bring it down to single-user mode before proceeding. With the usual disclaimer out of the way, I'd like to point out that if you are using current hardware (i.e. your drive AND controller AND motherboard were manufactured in the last two or three years), you are at considerably lower risk. I've used these commands on several boxes with various hardware configurations, and the worst I've seen happen is the occasional hang, with no data problems on reboot. And no matter how much you might whine at me and the world in general for your personal misfortune, we all know who is ultimately responsible for the well-being of YOUR box: YOU ARE. Caveat Fair Reader. Now, then. If I haven't scared you away yet, try this (as root, preferably in single-user mode):
You'll see something like: /dev/hda: What does this tell us? The But even with varying numbers, 3.58 MB/sec is PATHETIC for the above hardware. I thought the ad for the HD said something about 66MB per second!!?!? What gives? Well, let's find out more about how Linux is addressing your drive:
These are the defaults. Nice, safe, but not necessarily optimal. What's all this about 16-bit mode? I thought that went out with the 386! And why are most of the other options turned off? Well, it's generally considered a good idea for any self-respecting distribution to install itself in the kewlest, slickest, but SAFEST way it possibly can. The above settings are virtually guaranteed to work on any hardware you might throw at it. But since we know we're throwing something more than a dusty, 8-year-old, 16-bit multi-IO card at it, let's talk about the interesting options:
Great! 32-bit sounds nice. And some multi-reads might work. Let's re-run the benchmark:
WOW! Almost double the disk throughput without really trying! Incredible. But wait, there's more: We're still not unmasking interrupts, using DMA, or even a using decent PIO mode! Of course, enabling these gets riskier. (Why is it always a trade-off between freedom and security?) The man page mentions trying Multiword DMA mode2, so:
...Unfortunately this seems to be unsupported on this particular box (it hung like an NT box running a Java app.) So, after rebooting it (again in single-user mode), I went with this:
And then checked:
20.13 MB/sec. A far cry from the miniscule 3.58 we started with... By the way, notice how we specified the Now, after running the benchmark a few more times, reboot in multi-user mode and fire up X. Load Netscape. And try not to fall out of your chair.
|
|
Usare il comando "top" |
|
[root@asterisk ~]# mii-tool eth0: negotiated 100baseTx-FD flow-control, link ok |
|
rpm -q --filesbypkg NOME.rpm
rpm -qi NOME <-- fornisce tutte le
informazioni ad es. rpm -qi iptables |
|
Changing Linux Hostname
Guys you need to edit the following
files:
/etc/hosts /etc/sysconfig/network then reboot. |
|
cat /etc/sysconfig/clock
date 06131110 < 13 giugno ore 11.10 Settaggio data: date -s "16:55:30 July 7, 1986" Altra strada: Verificare il clock del bios e accertarsi che usa utc (o gmt che e' lo stesso). Cosi' non ci sono problemi per l'ora legale [root@elpi asterisk]# hwclock --systohc --utc touch -m ./sendmail.cf Il file sendmail.cf avra' il timestamp messo all'ora corrente Con date +%s si vede la data epoch PER SISTEMARE IL FUSO ORARIO (supponiamo di avere anche ntp attivo) cp /usr/share/zoneinfo/Europe/Rome /etc/localtime
Poi in /etc/sysconfig/clock vedere la timezone (che deve avere la
corrispondenza giusta in /etc/localtime) |
|
Usare il comando 'locate' che usa un database che si aggiorna ogni notte e che si puo' forzare con: /etc/cron.daily/mlocate.cron find . -size +50000k -type f
|
|
ls | wc -l |
|
Supponiamo che abbiamo 1000 file in un folder e vogliamo sapere in
quale file c'e' la stringa "gianrico@prova". Il segreto e' usare l'opzione "-H". Le opzioni "-A2" e "-B2" indicano invece che vogliamo stampate anche le due righe antecedenti e conseguenti il match:
grep "gianrico@prova" -A2 -B2 -H ./* grep -v "pippo" <-- e' la negazione della regexp: restituisce tutte le righe NON contenenti "pippo" Estrai da un file le sottostringhe che fanno match con una espressione regolare: sed 's / . * \ ( PROVA \ / [0-9] \ {3\} \) .* / \1 /'
showchannels Remove le linee duplicate:
|
|
$ \cp -f <filename> <path/to/existing_file> Backslashing the command temporarily |
|
dd if=/dev/mapper/vg00-data | ssh
[email protected] "dd of=/root/pippo.iso" |
|
yum install telnet-server jed /etc/xinetd.d/telnet <-- mettere disabled no service xinetd restart |
|
1) Nel file di log del sistema messages andare a cercare il nome del file della cartella dove c'e' il dump: Jul 1 12:00:54 5wind abrtd: Directory 'ccpp-1372672854-17380' creation detected Jul 1 12:00:54 5wind abrt: saved core dump of pid 17380 to /var/cache/abrt/ccpp-1372672854-17380/coredump (618496 bytes) Jul 1 12:00:57 5wind abrtd: Getting local universal unique identification... Jul 1 12:00:57 5wind abrtd: Crash is in database already Jul 1 12:00:57 5wind abrtd: Already saved crash, just sending dbus signal 2) Andare in cd /var/cache/abrt/ccpp-1372672854-17380/ [root@5wind ccpp-1372672854-17380]# ls -l total 652 -rw-r--r-- 1 root root 4 2013-07-01 12:00 analyzer -rw-r--r-- 1 root root 4 2013-07-01 12:00 architecture -rw-r--r-- 1 root root 20 2013-07-01 12:00 cmdline -rw-r--r-- 1 root root 7 2013-07-01 12:00 component -rw-r--r-- 1 root root 618496 2013-07-01 12:00 coredump -rw-r--r-- 1 root root 89 2013-07-01 12:00 description -rw-r--r-- 1 root root 20 2013-07-01 12:00 executable -rw-r--r-- 1 root root 26 2013-07-01 12:00 kernel -rw-r--r-- 1 root root 32 2013-07-01 12:00 package -rw-r--r-- 1 root root 34 2013-07-01 12:00 reason -rw-r--r-- 1 root root 31 2013-07-01 12:00 release -rw-r--r-- 1 root root 10 2013-07-01 12:00 time -rw-r--r-- 1 root root 1 2013-07-01 12:00 uid 3) Analizzando i file si capisce esattamente cosa ha creato il crash, in questo caso la libreria "fprintd" [root@5wind ccpp-1372672854-17380]# cat cmdline /usr/libexec/fprintd [root@5wind ccpp-1372672854-17380]# cat package fprintd-0.1-15.git04fd09cfa.fc12 |