[mrtg]indexmaker 的問題
[color=red][/usr/ports] # /usr/local/bin/indexmaker --output=/www/mrtg/index.html /etc/mrtg.cfg[/color][b]Use of uninitialized value in hash element at /usr/local/bin/indexmaker line 353.[/b]
以下複製 /usr/local/bin/indexmaker 內容
348行 # -----------------------------------------------------------
349行 # print the graph items
350行 # -----------------------------------------------------------
351行 my $itemnr = 0;
352行 my $first = $order[0];
353行 my $host = $$rcfg{host}{$first};
354行 if ($host){
355行 $index .= "<a NAME=\"$host\"></a><tr><td>$$opt{headon}Interfaces of $host $$opt{headoff}</td></tr>" if $$opt{per
} else {
$index .= "<a NAME=\"$host\"></a><tr><td>$$opt{headon}Special Items$$opt{headoff}</td></tr>" if $$opt{perhost};
}
foreach my $item (@order) {
if ($$opt{perhost}) {
my $newhost = $$rcfg{host}{$item} || 'unspecified host';
if (!($host eq $newhost)) {
$host = $newhost;
if ($host){
$index .= "<tr><td>$$opt{headon}Interfaces of $host $$opt{headoff}</td></tr>\n";
} else {
$index .= "<tr><td>$$opt{headon}Special Items$$opt{headoff}</td></tr>\n";
}
$index .= "<tr>\n";
$itemnr=0;
}
}
$$opt{prefix} = $$rcfg{prefixes}->{$item} if ($$opt{autoprefix});
$itemnr++;
[size=5][b]幫我看一下 = = 我找不到問題點[/b][/size] 無解@@!
你要不要 更新一下 ports tree 然後 MRTG 重新安裝看看阿? 嗯,我今天已經把所有的 ports
都殺掉重新抓了,再看看能不能裝上去。
=========================================
剛剛測試了之後,發現情況還是一樣
星雨 有什麼方式可以將 indexmaker 更新?~
[[i] 本帖最後由 Bhee 於 2008-1-22 11:17 PM 編輯 [/i]] [code]# cd /usr/ports/net-mgmt/mrtg/;make deinstall clean[/code]
你是用這樣解除安裝的嗎?
這指令下下去後應該就會將 indexmaker 刪除了阿!
如果還有問題我是覺得不是 mrtg 本身工具的問題
而是你系統 shell 的環境設定有問題 是沒有錯。
我都是這樣去刪除的,目前的話也還沒有解決。
你說可能是我的系統 shell 環境設定有問題
我想我再看看好了
.cshrc
/etc/csh.cshrc 我先去看看好了! 你 shell 是用 tcsh 嗎?
如果是的話! 我可以給你我的 csh.cshrc 你在用看看阿...
OR 把 csh.cshrc 內容先都清空 重新登入
在下一次 indexmaker 看看.. 我的 shell 是用 tcsh 沒有錯。
目前的話我的設定是這樣[code]root@uniorg [/etc] # cat csh.cshrc
# $FreeBSD: src/etc/root/dot.cshrc,v 1.25.2.2 2001/03/05 13:36:53 asmodai Exp $
#
# .cshrc - csh resource script, read at beginning of execution by each shell
#
# see also csh(1), environ(7).
#
# 中文相容設定
setenv ENABLE_STARTUP_LOCALE zh_TW.Big5
setenv LC_CTYPE zh_TW.Big5
#setenv LC_CTYPE is_IS.ISO_8859-1 #設下去中文的程式中文字會變亂碼
setenv LANG zh_TW.Big5
setenv MM_CHARSET utf-8
## Aliases
alias nr 'netstat -rn'
alias ?? 'whereis'
alias ? 'which'
alias lm 'ls -al /var/mail |more'
alias lmq 'ls -al /var/spool/mqueue |more'
alias scr screen -U
alias sls screen -ls
alias irc irssi -c irc.linux.org
#alias ls 'env LC_CTYPE=en_US.ISO_8859-1 ls'
alias ls 'gnuls --color=auto --show-control-chars'
alias write 'env LC_CTYPE=en_US.ISO_8859-1 write'
alias talk 'env LC_CTYPE=en_US.ISO_8859-1 talk'
alias wall 'env LC_CTYPE=en_US.ISO_8859-1 wall'
alias finger 'env LC_CTYPE=en_US.ISO_8859-1 finger'
alias mail 'env LC_CTYPE=en_US.ISO_8859-1 mail'
alias l 'ls -al | cless'
# 其他設定
set recexact
set autolist # ls 自動list目錄or檔名
set matchbeep = ambiguous
set autoexpand
set autocorrect
#Ctrl-D no logout
#set ignoreeof
set noclobber
set notify
set correct = cmd # 指令修正問答
set prompt = "%{^[[32m%}%B%n@%m [%/] # "
set prompt2 = "(%t %m)%~ #%% "
set prompt3 = "%SDo you mean [%R] (y/n/e) ? "
set history = 500
set savehist = 500
set time=100
#set watch=(1 any any)
set symlinks = ignore
set listlinks
set listjobs
set rmstar
set showdots
#set tperiod = 30
#set autologout = (60 2)[/code] 你這是我PO的那個這是我設的環境設定阿@@!
我的一切正常耶
你直接把 353行 my $host = $$rcfg{host}{$first};
改成你這台的 hostname 試看看吧!
頁:
[1]