cron-aptからの次のようなエラーメッセージがrootに届いた場合の対処。

 
CRON-APT RUN [/etc/cron-apt/config]: Sun Dec 4 04:00:03 JST 2011
CRON-APT SLEEP: 1777, Sun Dec 4 04:29:42 JST 2011
CRON-APT ACTION: 0-update
CRON-APT LINE: /usr/bin/aptitude update -o quiet=2
Reading package lists…
W: Duplicate sources.list entry http://old-releases.ubuntu.com/ubuntu/ karmic/main i386 Packages
(/var/lib/apt/lists/old-releases.ubuntu.com_ubuntu_dists_karmic_main_binary-i386_Packages)
W: Duplicate sources.list entry http://old-releases.ubuntu.com/ubuntu/ karmic/restricted i386 Packages
(/var/lib/apt/lists/old-releases.ubuntu.com_ubuntu_dists_karmic_restricted_binary-i386_Packages)
W: Duplicate sources.list entry http://old-releases.ubuntu.com/ubuntu/ karmic/universe i386 Packages
(/var/lib/apt/lists/old-releases.ubuntu.com_ubuntu_dists_karmic_universe_binary-i386_Packages)
W: Duplicate sources.list entry http://old-releases.ubuntu.com/ubuntu/ karmic/multiverse i386 Packages
(/var/lib/apt/lists/old-releases.ubuntu.com_ubuntu_dists_karmic_multiverse_binary-i386_Packages)
W: Duplicate sources.list entry http://old-releases.ubuntu.com/ubuntu/ karmic-updates/main i386 Packages
(/var/lib/apt/lists/old-releases.ubuntu.com_ubuntu_dists_karmic-updates_main_binary-i386_Packages)
W: Duplicate sources.list entry http://old-releases.ubuntu.com/ubuntu/ karmic-updates/restricted i386 Packages
(/var/lib/apt/lists/old-releases.ubuntu.com_ubuntu_dists_karmic-updates_restricted_binary-i386_Packages)
W: Duplicate sources.list entry http://old-releases.ubuntu.com/ubuntu/ karmic-updates/universe i386 Packages
(/var/lib/apt/lists/old-releases.ubuntu.com_ubuntu_dists_karmic-updates_universe_binary-i386_Packages)
W: Duplicate sources.list entry http://old-releases.ubuntu.com/ubuntu/ karmic-updates/multiverse i386 Packages
(/var/lib/apt/lists/old-releases.ubuntu.com_ubuntu_dists_karmic-updates_multiverse_binary-i386_Packages)
W: Duplicate sources.list entry http://old-releases.ubuntu.com/ubuntu/ karmic-security/main i386 Packages
(/var/lib/apt/lists/old-releases.ubuntu.com_ubuntu_dists_karmic-security_main_binary-i386_Packages)
W: Duplicate sources.list entry http://old-releases.ubuntu.com/ubuntu/ karmic-security/restricted i386 Packages
(/var/lib/apt/lists/old-releases.ubuntu.com_ubuntu_dists_karmic-security_restricted_binary-i386_Packages)
W: Duplicate sources.list entry http://old-releases.ubuntu.com/ubuntu/ karmic-security/universe i386 Packages
(/var/lib/apt/lists/old-releases.ubuntu.com_ubuntu_dists_karmic-security_universe_binary-i386_Packages)
W: Duplicate sources.list entry http://old-releases.ubuntu.com/ubuntu/ karmic-security/multiverse i386 Packages
(/var/lib/apt/lists/old-releases.ubuntu.com_ubuntu_dists_karmic-security_multiverse_binary-i386_Packages)
W: You may want to run apt-get update to correct these problems

さっぱり解らなかったので、次のようなコマンドを打ってみたら、次の日からエラーがこなくなった。

 # sudo apt-get dist-upgrade

 

 

Linux Mint 17 Qianaでの、MRTGのインストールと設定。

下図のような折れ線グラフ+棒グラフを5分おきに更新させるツール、MRTGをご紹介します。

 aaa

# apt-get install snmp snmpd mrtg hddtemp lm-sensors nkf

# vi /etc/snmp/snmpd.conf


(下記を最下行に追記する。)

view all included .1 80
view system included .1.3.6.1.2.1.1

com2sec local localhost private
com2sec mynetwork 192.168.0.0/24 public
(上記の下線部分は、環境に合わせて適宜変更してください。)

group MyROSystem v1 paranoid
group MyROSystem v2c paranoid
group MyROSystem usm paranoid
group MyROGroup v1 readonly
group MyROGroup v2c readonly
group MyROGroup usm readonly
group MyRWGroup v1 readwrite
group MyRWGroup v2c readwrite
group MyRWGroup usm readwrite
group MyRWGroup any local
group MyROGroup any mynetwork

access MyROSystem "" any noauth exact system none none
access MyROGroup "" any noauth 0 all none none
access MyRWGroup "" any noauth 0 all all all

disk / 10000


snmpd を再起動し、mrtg.cfgを作成する。

# /etc/init.d/snmpd restart

# cfgmaker private@localhost > /etc/mrtg.cfg


mrtg.cfgを編集します。

# vi /etc/mrtg.cfg


# Created by

# /usr/bin/cfgmaker –ifref=descr –ifdesc=descr public@192.168.0.111

### Global Config Options

#  for UNIX
WorkDir: /home/USERDIR/public_html/html/mrtg/

#  or for NT
# WorkDir: c:mrtgdata

### Global Defaults

#  to get bits instead of bytes and graphs growing to the right
Options[_]: growright, noinfo

EnableIPv6: no
Language:eucjp

### Interface 2 >> Descr: ‘eth0’ | Name: ‘eth0’ | Ip: ‘192.168.0.111’ | Eth: ’00-03-0d-d3-bf-46′ ###

Target[eth0]: eth0:public@192.168.0.111:
SetEnv[eth0]: MRTG_INT_IP="192.168.0.111" MRTG_INT_DESCR="eth0"
MaxBytes[eth0]: 125000000
Title[eth0]: eth0トラフィック
PageTop[eth0]: <h1>eth0トラフィック</h1>

### CPU Usage ###
Target[cpu]: .1.3.6.1.4.1.2021.11.50.0&.1.3.6.1.4.1.2021.11.52.0:private@localhost
MaxBytes[cpu]: 100
#Unscaled[cpu]: dwmy # 縦軸を100%にしないで実績値に合わせる(100%にするとグラフがみえないため)
Options[cpu]: growright, noinfo, nopercent
YLegend[cpu]: CPU usage(%)
ShortLegend[cpu]: (%)
LegendI[cpu]: ユーザ 
LegendO[cpu]: システム
Legend1[cpu]: CPU使用率(ユーザ)(%)
Legend2[cpu]: CPU使用率(システム)(%)
Title[cpu]: CPU使用率
PageTop[cpu]: <H1>CPU使用率</H1>

# free(コマンド’free’を打ち込み、下記の下線の部分を、”Memory Free”項目の、”MaxBytes1[mem]:”、”MaxBytes2[mem]:”にコピペする。)

             total       used       free     shared    buffers     cached
Mem:       4049052    3714600     334452          0     565632    1791352
-/+ buffers/cache:    1357616    2691436
Swap:      4124668        356    4124312

### Memory Free ####
Target[mem]: .1.3.6.1.4.1.2021.4.6.0&.1.3.6.1.4.1.2021.4.4.0:private@localhost
MaxBytes1[mem]: 4049052

MaxBytes2[mem]: 4124668
Unscaled[mem]: dwmy
Options[mem]: gauge, absolute, growright, noinfo
YLegend[mem]: Mem Free(Bytes)
ShortLegend[mem]: Bytes
kilo[mem]: 1024
kMG[mem]: k,M,G,T,P
LegendI[mem]: Real
LegendO[mem]: Swap
Legend1[mem]: 空き物理メモリ[MBytes]
Legend2[mem]: 空きスワップメモリ[MBytes]
Title[mem]: 空きメモリ量
PageTop[mem]: <H1>空きメモリ量</H1>

### Disk Used ####
Target[disk]: .1.3.6.1.4.1.2021.9.1.9.1&.1.3.6.1.4.1.2021.9.1.9.1:private@localhost
MaxBytes[disk]: 100
Unscaled[disk]: dwmy
Options[disk]: gauge, absolute, growright, nopercent, noinfo
YLegend[disk]: Disk Used(%)
ShortLegend[disk]: (%)
LegendI[disk]: / Disk used
LegendO[disk]: / Disk Used
Legend1[disk]: / Disk used
Legend2[disk]: / Disk used
Title[disk]: ディスク使用率
PageTop[disk]: <H1>ディスク使用率</H1>

### CPU Temp ###
Target[cputemp]: `/root/sensors.sh`
MaxBytes[cputemp]: 100
Title[cputemp]: CPU温度
PageTop[cputemp]:<h1>CPU温度</h1>
Options[cputemp]: growright,absolute,gauge,nopercent,noinfo
WithPeak[cputemp]: ymw
#unscaled[cputemp]: dwmy
YLegend[cputemp]: Temperature
ShortLegend[cputemp]: C
LegendI[cputemp]: CPU0
LegendO[cputemp]: CPU1
Legend1[cputemp]: CPU0温度
Legend2[cputemp]: CPU1温度

### SSD Temp ###
Target[hddtemp]: `/root/hddtemp.sh`
MaxBytes[hddtemp]: 80
Title[hddtemp]: SSD温度
PageTop[hddtemp]:<h1>SSD温度</h1>
Options[hddtemp]: growright,absolute,gauge,nopercent,noinfo
WithPeak[hddtemp]: ymw
YLegend[hddtemp]: Temperature
ShortLegend[hddtemp]: C
LegendI[hddtemp]: Temp:SSD
LegendO[hddtemp]: Temp:SSD
Legend1[hddtemp]: SSD Temperature in Degrees Celcius
Legend2[hddtemp]: SSD Temperature in Degrees Celcius


mrtg.cfg を mrtg.cfg.orgとしてコピーし、mrtg.cfg をEUC-JP化する

# cp /etc/mrtg.cfg /etc/mrtg.cfg.org

# nkf -e /etc/mrtg.cfg.org > /etc/mrtg.cfg


sensors.shと、hddtemp.shを"/root"に作成する。

# vi /root/sensors.sh


#!/bin/sh

sensors | grep Core | awk ‘{print $3}’ | sed -e ‘s/+//’ -e ‘s/[^0-9+.].*//’


# vi /root/hddtemp.sh


#!/bin/sh

/usr/sbin/hddtemp -n /dev/sda1
/usr/sbin/hddtemp -n /dev/sda2


# chmod +x /root/sensors.sh /root/hddtemp.sh 


CPUの温度を測定するための準備

# sensors-detect

(下記の「YES/no」の質問は、みんな”ENTERキー”でおk。)


# sensors-detect revision 5861 (2010-09-21 17:21:05 +0200)
# System: Mouse Computer I50Ix1 (laptop)

This program will help you determine which kernel modules you need
to load to use lm_sensors most effectively. It is generally safe
and recommended to accept the default answers to all questions,
unless you know what you’re doing.

Some south bridges, CPUs or memory controllers contain embedded sensors.
Do you want to scan for them? This is totally safe. (YES/no):
Module cpuid loaded successfully.
Silicon Integrated Systems SIS5595…                       No
VIA VT82C686 Integrated Sensors…                          No
VIA VT8231 Integrated Sensors…                            No
AMD K8 thermal sensors…                                   No
AMD Family 10h thermal sensors…                           No
AMD Family 11h thermal sensors…                           No
Intel digital thermal sensor…                             Success!
    (driver `coretemp’)
Intel AMB FB-DIMM thermal sensor…                         No
VIA C7 thermal sensor…                                    No
VIA Nano thermal sensor…                                  No

Some Super I/O chips contain embedded sensors. We have to write to
standard I/O ports to probe them. This is usually safe.
Do you want to scan for Super I/O sensors? (YES/no):
Probing for Super-I/O at 0x2e/0x2f
Trying family `National Semiconductor’…                   No
Trying family `SMSC’…                                     No
Trying family `VIA/Winbond/Nuvoton/Fintek’…               No
Trying family `ITE’…                                      No
Probing for Super-I/O at 0x4e/0x4f
Trying family `National Semiconductor’…                   Yes
Found unknown chip with ID 0x8502

Some hardware monitoring chips are accessible through the ISA I/O ports.
We have to write to arbitrary I/O ports to probe them. This is usually
safe though. Yes, you do have ISA I/O ports even if you do not have any
ISA slots! Do you want to scan the ISA I/O ports? (YES/no):
Probing for `National Semiconductor LM78′ at 0x290…       No
Probing for `National Semiconductor LM79′ at 0x290…       No
Probing for `Winbond W83781D’ at 0x290…                   No
Probing for `Winbond W83782D’ at 0x290…                   No

Lastly, we can probe the I2C/SMBus adapters for connected hardware
monitoring devices. This is the most risky part, and while it works
reasonably well on most systems, it has been reported to cause trouble
on some systems.
Do you want to probe the I2C/SMBus adapters now? (YES/no):
Using driver `i2c-i801′ for device 0000:00:1f.3: Intel ICH9
Module i2c-i801 loaded successfully.
Module i2c-dev loaded successfully.

Next adapter: i915 gmbus disabled (i2c-0)
Do you want to scan it? (YES/no/selectively):

Next adapter: i915 gmbus ssc (i2c-1)
Do you want to scan it? (YES/no/selectively):

Next adapter: i915 GPIOB (i2c-2)
Do you want to scan it? (YES/no/selectively):

Next adapter: i915 gmbus vga (i2c-3)
Do you want to scan it? (YES/no/selectively):
Next adapter: i915 GPIOA (i2c-4)
Do you want to scan it? (YES/no/selectively):
Next adapter: i915 gmbus panel (i2c-5)
Do you want to scan it? (YES/no/selectively):
Client found at address 0x50
Probing for `Analog Devices ADM1033’…                     No
Probing for `Analog Devices ADM1034’…                     No
Probing for `SPD EEPROM’…                                 No
Probing for `EDID EEPROM’…                                Yes
    (confidence 8, not a hardware monitoring chip)

Next adapter: i915 GPIOC (i2c-6)
Do you want to scan it? (YES/no/selectively):
Client found at address 0x50
Probing for `Analog Devices ADM1033’…                     No
Probing for `Analog Devices ADM1034’…                     No
Probing for `SPD EEPROM’…                                 No
Probing for `EDID EEPROM’…                                Yes
    (confidence 8, not a hardware monitoring chip)

Next adapter: i915 gmbus dpc (i2c-7)
Do you want to scan it? (YES/no/selectively):

Next adapter: i915 GPIOD (i2c-8)
Do you want to scan it? (YES/no/selectively):

Next adapter: i915 gmbus dpb (i2c-9)
Do you want to scan it? (YES/no/selectively):

Next adapter: i915 GPIOE (i2c-10)
Do you want to scan it? (YES/no/selectively):

Next adapter: i915 gmbus reserved (i2c-11)
Do you want to scan it? (YES/no/selectively):

Next adapter: i915 gmbus dpd (i2c-12)
Do you want to scan it? (YES/no/selectively):

Next adapter: i915 GPIOF (i2c-13)
Do you want to scan it? (YES/no/selectively):

Next adapter: DPDDC-B (i2c-14)
Do you want to scan it? (YES/no/selectively):

Next adapter: DPDDC-C (i2c-15)
Do you want to scan it? (YES/no/selectively):

Next adapter: DPDDC-D (i2c-16)
Do you want to scan it? (YES/no/selectively):

Now follows a summary of the probes I have just done.
Just press ENTER to continue:

Driver `coretemp’:
  * Chip `Intel digital thermal sensor’ (confidence: 9)

To load everything that is needed, add this to /etc/modules:
#—-cut here—-(ココが重要ポイントです。この部分を切り取り、”/etc/modules”に追記します。)
# Chip drivers
coretemp
#—-cut here—-

If you have some drivers built into your kernel, the list above will
contain too many modules. Skip the appropriate ones!

Do you want to add these lines automatically to /etc/modules? (yes/NO)

Unloading i2c-dev… OK
Unloading i2c-i801… OK
Unloading cpuid… OK


# vi /etc/modules


# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

lp

#—-cut here—-
# Chip drivers
coretemp
#—-cut here—-


# modprobe coretemp

# reboot (PC再起動。これは一応です。) 


# indexmaker /etc/mrtg.cfg

                    –columns=1

                    –title="Linux Mint 17 Qiana MRTG"

                    –addhead="<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset = euc-jp">"

                    –output=/home/USERDIR/public_html/html/mrtg/index.html

 

# vi /home/USERDIR/public_html/html/mrtg/index.html


 <!– <meta http-equiv="content-type" content="text/html; charset=iso-8859-15" > –>
(indexmakerで出力した物の、7行目辺りのこの部分を”<!–”、”–>”で括ると、文字化けしないで表示される。)
 


# vi /etc/cron.d/mrtg


(下記のように書き換えます。)

*/5 *   * * *   root    env LANG=C /usr/bin/mrtg /etc/mrtg.cfg 2>&1


以上で、インストールと設定作業は終了です。このまま、5分以上待ってみて、グラフが正常に更新されていれば、おkということです。
お疲れ様でした!(^ω^)。

LinuxMint11でWindowsからVNCで、KDE(Kubuntu)を動かす。

vnc4serverでは画面がおかしくなっていた、KDEの画面は、x11vncを使用することによって、GnomeでもKDEでも、自由に動かすことが出来ました。

少し、画面が細かくて綺麗すぎるので、動作が鈍い感じも少しだけしますが、まぁ普通に使えると思います。これで、VNCでKDEならFedoraと思っていたのを思いとどまることが出来ました

そして、vnc4serverでは、seamonkeyでFLASHの部分でエラーが出て、画面表示が完璧ではなかった物が、x11vncではseamonkeyで同じページを開いてみたが、FLASHもみんな動いていて、完璧に動作している。

 

参考:絶対無糖 (Zettai Non Sugar)

Akismetサーバーに接続できなかった事も解決したが、XOOPSのProtectorの一部不推奨設定になってしまった。

WORDPRESSのAkismetへのネットワーク接続が出来なくなっていた問題で、原因を探していました。そしたら、「php.ini」の設定を、下記のようにしたら、ちゃんと接続できるようになりました。

 

allow_url_fopen = Off


allow_url_fopen = On

 

しかしながら、XOOPSのProtectorのこの部分が不推奨設定になってしまいました。サイトごとにPHPの設定を変えればいいです。ちなみにPHPのサイトごとの設定は、下記のようにします。

 

<VirtualHost *:80>
        DocumentRoot /hoge/hoge
        ServerName thanks.linuxparadise.net
        php_admin_flag allow_url_fopen Off
</VirtualHost>

 

参考:今日も俺は空・寝・遊

Page Speed Downloadsを採用しました。

http://code.google.com/intl/ja/speed/page-speed/download.html

何となく、ブラウザの表示が速くなった?(マシンに依るでしょうがね。^^;)

私のサーバーは、PHPにはeAcceleratorも使用しております。バリバリ速くなっているはずですが、体感速度はどうなんでしょうかね?

ブラウザ自体にキャッシュとか設定してないと、結局は?? と、本当に、キャッシュが色々とあちこちにあってわけわかんないですがね(笑)。

でもまぁ、勉強のために導入しました。

start: Job is already running: anacronとCron Daemonがroot宛に毎日送ってきたら。

私は、メールは必要な物以外はRootに送ってもらいたくないので、

 

# vi /etc/cron.d/anacron

# /etc/cron.d/anacron: crontab entries for the anacron package

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
MAILTO="" ← (これを付け加える。すると、ROOT宛にメールを送らなくなる。)

#30 7    * * *   root   test -x /etc/init.d/anacron && /usr/sbin/invoke-rc.d anacron start >/dev/null
30 *    * * *   root    start -q anacron || :

 

とすれば、次の日からは送ってこなくなった。

Chromiumウェブブラウザが評判いいらしい!

Adobe Flash PluginがSeamonkeyや、FireFoxで動作がおかしかったので、結局Google社のChromiumウェブブラウザにしてみた。そしたら、Flashも動いてくれた。そうか、さすが最先端。どんどん新しいウェブブラウザにも開発を注いでいるということなのか!!

と、思いました。

ShoutCastのFLASHも動きました。要するに、/etc/hostsにwww.shotcast.comのIPアドレス等、何も書かなければ普通に動いてくれました。ShoutCastのサイトも表示されました。

Chromiumウェブブラウザのインストールは、デスクトップ左下のメニューから、「ソフトウェア管理」を選択し、「インターネット」の中から「chromium-browser」を選びインストールすればいい。

私も、ブラウザは乗り換えの時期かなぁと思ったのでした。

これで、SSIも動いたし、FLASHも動いてくれたと、徐々に問題が解決されていくのは、LINUXならではの醍醐味(笑)。

 


ついでに、ソフトウェア管理から、Dropboxもインストールしておいた。これもあると便利ですからね。その後は、「インターネット」の中から「Dropbox」を選択しインストールを進めていけば簡単作業で行けるはずです。

Bansheeでは、DAAPで、mp3の音楽が鳴らなかった。そこで、Rhythmboxにしました。

LinuxMint11になって、いままでのRhythmboxからBansheeに変ったのですが、DAAPでMP3の音楽が鳴らないのです!!!

そこで、Rhythmboxならば、どうなんだろうと思って、

 

#apt-get install Rhythmbox

 

とやって、インストール。

Pluginの所辺りをいじって、ラジオと、「DAAP楽曲共有」をチェックしてから、

DAAPの音楽共有のMP3を再生させると、「動くじゃないか! ノリノリの音楽が流れてくるよぉ!」

と為りまして、私はBansheeは使い方が解らないし、使い慣れたRhythmboxを今度から使う事にしました。

 

※注意点としまして、最初はRhythmboxは音量のボリュームが「ミュート」になっているので、音量を上げて下さい。

そして、再生出来るか試して下さいね!

1 120 121 122 123 124 139