Ağustos 26, 2008

Bilgisayarım Rastgele Klasik Müzik Çalıyor

Google ile herhangi bir şeyi ararken, Microsoft'un destek sayfasını gayri ihtiyarı olsa da görmüşsünüzdür.

Bugün stumble yaparken, Microsoft'un destek sayfasında şöyle bir hata durumu ile karşılaştım: Bilgisayarım rastgele klasik müzik çalıyor.

Nasıl yani?!

Ağustos 13, 2008

GP2X F200 için Open2X kernel patch


GP2X F200 modelini Open2X çekirdeği ile açtığımda 64 MB olan NAND belleğin 32 MB ile sınırlı olduğunu farkettim.
Eğer üşenmeyip cross derleme ortamını kurup Open2X çekirdeğini derlemek isteyen var ise; buyrun size NAND'i 62 MB gösterecek patch.





Index: drivers/mtd/nand/mp2520f.c
===================================================================
--- drivers/mtd/nand/mp2520f.c (revision 321)
+++ drivers/mtd/nand/mp2520f.c (working copy)
@@ -70,7 +70,7 @@
* Define static partitions for the flash device.
*/

-#define NUM_PARTITIONS 5
+#define NUM_PARTITIONS 4
static struct mtd_partition partition_info[] = {
{
name: "U-Boot Bootloader",
@@ -87,10 +87,6 @@
offset: MTDPART_OFS_APPEND,
}, {
name: "Filesystem-A (YAFFS)",
- size: 0x1800000,
- offset: MTDPART_OFS_APPEND,
- }, {
- name: "Filesystem-B (YAFFS)",
size: MTDPART_SIZ_FULL,
offset: MTDPART_OFS_APPEND,
}
@@ -142,15 +138,11 @@
offset: MTDPART_OFS_APPEND,
}, {
name: "Filesystem",
- size: 0x1E00000, /* 30MB */
- offset: MTDPART_OFS_APPEND,
- }, {
- name: "Extend",
size: MTDPART_SIZ_FULL,
offset: MTDPART_OFS_APPEND,
}
};
-#define NUM_PARTITIONS 5
+#define NUM_PARTITIONS 4
#endif /* CONFIG_MTD_OPEN2X_SINGLE_PARTITION */
#endif /* 0 */

Ağustos 11, 2008

Debian/Ubuntu üzerinde MRTG

==Kurulumlar==
Mrtg, verileri SNMP'den alır. Verileri de web üzerinden göstereceğimiz için apache kuracağız. Bu sebeple MRTG ile beraber SNMP ve Apache2 kurmamız gerekiyor.

# apt-get install snmpd mrtg apache2

==SNMP ayarları==
Ardından SNMP sunucusunun konfigurasyon dosyasını değiştirmemiz gerekiyor, bu dosyayı herhani bir metin editörü ile açın.

# /etc/snmp/snmpd.conf

Bu dosyada aşağıdaki satırın başına, # koyun ki bu satır yorum satırı olarak algılansın.
com2sec paranoid default public

Ve aşağıdaki satırı ekleyin.
com2sec readonly default public

Ve SNMP sunucusunu yeniden başlatın.

/etc/init.d/snmpd restart


==MRTG Ayarları==

# mkdir /etc/mrtg


=Ağ Trafiği:

cfgmaker --output=/etc/mrtg/traffic.cfg \
--ifdesc=ip --ifref=descr \
--global "WorkDir: /var/www/mrtg/" \
--global "Options[_]: bits,growright" \
public@localhost


=Cpu:

/etc/mrtg/cpu.cfg:
WorkDir: /var/www/mrtg
LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt
Target[localhost.cpu]:ssCpuRawUser.0&ssCpuRawUser.0:public@127.0.0.1 + ssCpuRawSystem.0&ssCpuRawSystem.0:public@127.0.0.1 + ssCpuRawNice.0&ssCpuRawNice.0:public@127.0.0.1
RouterUptime[localhost.cpu]: public@127.0.0.1
MaxBytes[localhost.cpu]: 100
Title[localhost.cpu]: CPU Load
PageTop[localhost.cpu]: Active CPU Load %
Unscaled[localhost.cpu]: ymwd
ShortLegend[localhost.cpu]: %
YLegend[localhost.cpu]: CPU Utilization
Legend1[localhost.cpu]: Active CPU in % (Load)
Legend2[localhost.cpu]:
Legend3[localhost.cpu]:
Legend4[localhost.cpu]:
LegendI[localhost.cpu]: Active
LegendO[localhost.cpu]:
Options[localhost.cpu]: growright,nopercent


=Cpu Sıcaklığı:

/etc/mrtg/mrtg-cpu.cfg
LoadMIBs: /usr/share/snmp/mibs/LM-SENSORS-MIB.txt
Target[localhost.cpu-temp]: .1.3.6.1.4.1.2021.13.16.2.1.3.1&.1.3.6.1.4.1.2021.13.16.2.1.3.1:public@localhost
PageTop[localhost.cpu-temp]: CPU Temperature
WorkDir: /var/www/mrtg
Options[localhost.cpu-temp]: nopercent,growright,gauge,noinfo,pngdate,nobanner
Factor[localhost.cpu-temp]: 0.001
PNGTitle[localhost.cpu-temp]: CPU Temperature
Title[localhost.cpu-temp]: CPU Temperature
kMG[localhost.cpu-temp]: C
MaxBytes[localhost.cpu-temp]: 100000
YLegend[localhost.cpu-temp]: Temperature (c)
ShortLegend[localhost.cpu-temp]: C
LegendI[localhost.cpu-temp]: CPU Temperature:
LegendO[localhost.cpu-temp]:
Legend1[localhost.cpu-temp]: CPU Temperature
Legend2[localhost.cpu-temp]:
XSize[localhost.cpu-temp]: 360
YSize[localhost.cpu-temp]: 75
Colours[localhost.cpu-temp]: DKBLUE#61A0DF,DKBLUE#0000DD,DARKGREEN#006600,VIOLET#FF00FF



=Bellek:

/etc/mrtg/mem.cfg:
LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt
Target[localhost.mem]: memAvailReal.0&memAvailReal.0:public@localhost
PageTop[localhost.mem]: Free Memory
WorkDir: /var/www/mrtg
Options[localhost.mem]: nopercent,growright,gauge,noinfo
Title[localhost.mem]: Free Memory
MaxBytes[localhost.mem]: 1000000
kMG[localhost.mem]: k,M,G,T,P,X
YLegend[localhost.mem]: bytes
ShortLegend[localhost.mem]: bytes
LegendI[localhost.mem]: Free Memory:
LegendO[localhost.mem]:
Legend1[localhost.mem]: Free memory, not including swap, in bytes


=Swap:

/etc/mrtg/swap.cfg:
LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt
Target[localhost.swap]: memAvailSwap.0&memAvailSwap.0:public@localhost
PageTop[localhost.swap]: Swap Memory
WorkDir: /var/www/mrtg
Options[localhost.swap]: nopercent,growright,gauge,noinfo
Title[localhost.swap]: Free Swap Memory
MaxBytes[localhost.swap]: 1000000
kMG[localhost.swap]: k,M,G,T,P,X
YLegend[localhost.swap]: bytes
ShortLegend[localhost.swap]: bytes
LegendI[localhost.swap]: Free Memory:
LegendO[localhost.swap]:
Legend1[localhost.swap]: Swap memory avail, in bytes


=Ping:

/etc/mrtg/ping.cfg:
WorkDir: /var/www/mrtg
Title[localhost.ping]: Round Trip Time
PageTop[localhost.ping]: Round Trip Time
Target[localhost.ping]: `/etc/mrtg/ping.sh`
MaxBytes[localhost.ping]: 2000
Options[localhost.ping]: growright,unknaszero,nopercent,gauge
LegendI[localhost.ping]: Pkt loss %
LegendO[localhost.ping]: Avg RTT
YLegend[localhost.ping]: RTT (ms)


=Disk:

/etc/mrtg/disk.cfg:
WorkDir: /var/www/mrtg/
Title[localhost.disk]: Disk Usage
PageTop[localhost.disk]: Free Disk Storage
Target[localhost.disk]: `/etc/mrtg/disk.sh`
#MaxBytes[localhost.disk]: 3779571220480 378060509184
#MaxBytes[localhost.disk]: 3870280929771520
MaxBytes[localhost.disk]: 387133961404416
kMG[localhost.disk]: k,M,G,T,P,X
Options[localhost.disk]: nopercent,growright,gauge,noinfo
LegendI[localhost.disk]: Free Disk
LegendO[localhost.disk]: Used Disk
YLegend[localhost.disk]: bytes
ShortLegend[localhost.disk]: bytes
Legend1[localhost.disk]: Available disk storage, in bytes
Legend2[localhost.disk]: Used disk storage, in bytes

=ping.sh:

/etc/mrtg/ping.sh:
#!/bin/sh
PING="/bin/ping"
# Google, for example
ADDR="google.com"
DATA=`$PING -c10 -s500 $ADDR -q 2>/dev/null`
if [ "$?" -eq "2" ]; then
echo 0
echo 0
exit 0
fi
LOSS=`echo $DATA | awk '{print $18 }' | tr -d %`
echo $LOSS
if [ $LOSS = 100 ];
then
echo 0
else
echo $DATA | awk -F/ '{print $5 }'
fi


=disk.sh:
/etc/mrtg/disk.sh:
#!/bin/sh
df |grep sda1| awk '{print $4}'
df |grep sda1| awk '{print $3}'

==Apache için index sayfasını oluşturmak==

/usr/bin/indexmaker --output=/var/www/mrtg/index.html \
--title="MRTG Istatistikleri :)" \
--sort=name \
--enumerate \
/etc/mrtg/traffic.cfg \
/etc/mrtg/cpu.cfg \
/etc/mrtg/disk.cfg \
/etc/mrtg/mem.cfg \
/etc/mrtg/swap.cfg \
/etc/mrtg/ping.cfg

==Crontab Ayarları==

/etc/cron.d/mrtg:
*/5 * * * * env LANG=C mrtg /etc/mrtg/cpu.cfg
*/5 * * * * env LANG=C mrtg /etc/mrtg/disk.cfg
*/5 * * * * env LANG=C mrtg /etc/mrtg/mem.cfg
*/5 * * * * env LANG=C mrtg /etc/mrtg/ping.cfg
*/5 * * * * env LANG=C mrtg /etc/mrtg/swap.cfg
*/5 * * * * env LANG=C mrtg /etc/mrtg/traffic.cfg

Kaynak:
http://www.debian-administration.org/articles/366
http://gentoo-wiki.com/HOWTO_SNMP_and_MRTG_Made_Easy

Ağustos 09, 2008

Hiç böyle bir README okumadınız!

$ cat /usr/share/doc/gnome-cups-manager/README

gnome-cups-manager
------------------

Once upon a time there was a printer who lived in the woods. He was a
lonely printer, because nobody knew how to configure him. He hoped
and hoped for someone to play with.

One day, the wind passed by the printer's cottage. "Whoosh," said the
wind. The printer became excited. Maybe the wind would be his
friend!

"Will you be my friend?" the printer asked.

"Whoosh," said the wind.

"What does that mean?" asked the printer.

"Whoosh," said the wind, and with that it was gone.

The printer was confused. He spent the rest of the day thinking and
jamming paper (for that is what little printers do when they are
confused).

The next day a storm came. The rain came pouring down, darkening the
morning sky and destroying the printer's garden. The little printer
was upset. "Why are you being so mean to me?" he asked.

"Pitter Patter, Pitter Patter," said the rain.

"Will you be my friend?" the printer asked shyly.

"Pitter Patter, Pitter Patter," said the rain, and then it left and
the sun came out.

The printer was sad. He spent the rest of the day inside, sobbing and
blinking lights cryptically (for that is what little printers do when
they are sad).

Then one day, a little girl stumbled into the printer's clearing in
the woods. The printer looked at this curious sight. He didn't know
what to think.

The little girl looked up at him. "Will you be my friend?" she asked.

"Yes," said the printer.

"What is your name?" asked the little girl.

"HP 4100TN", replied the printer.

"My name is gnome-cups-manager" said the little girl.

The printer was happy. He spent the rest of the day playing games and
printing documents, for that is what little printers do when they are
happy.

Linux şişmanlatır mı? :)