Solaris新手必讀-121個問題解答
117 Q: 我們有一臺Natra T1,它的/tmp目錄已經(jīng)長到90%,如果目錄滿了是否會使系統(tǒng)
運行異常.(因為我們運行的業(yè)務不能停,故不能重啟SUN機器來讓系統(tǒng)清空該目
錄,也不能直接清空該目錄,應為應用程序正在運行.)下面是一些數(shù)據(jù):
# df -k
Filesystem kbytes used a vail capacity Mounted on
/proc 0 0 0 0% /proc
/dev/dsk/c0t0d0s0 1258491 51942 1143625 5% / /dev/dsk/c0t0d0s6 1612343 500741 1063232 33% /usr
fd 0 0 0 0% /dev/fd
/dev/dsk/c0t0d0s3 33099 9211 20579 31% /var
/dev/dsk/c0t0d0s7 13550703 838475 12576721 7% /export/home
/dev/dsk/c0t0d0s5 30743 10319 17350 38% /opt
/dev/dsk/c0t0d0s1 548687 369368 124451 75% /usr/openwin
swap 627864 563360 64504 90% /tmp
# cd tmp
# ls
ps_data
# ls -a -l
total 98
drwxrwxrwt 6 sys sys 443 May 7 15:29 .
drwxr-xr-x 22 root root 512 Mar 20 17:45 ..
drwxrwxr-x 2 root root 176 Feb 27 23:18 .X11-pipe
drwxrwxr-x 2 root root 176 Feb 27 23:18 .X11-unix
drwxrwxrwx 2 root root 179 Feb 27 23:18 .pcmcia
drwxrwxrwt 2 root root 327 Feb 27 23:18 .rpc_door
-rw-rw-r-- 1 root sys 5056 Feb 27 23:18 ps_data
# cd .pcmcia
# ls -a -l
total 32
drwxrwxrwx 2 root root 179 Feb 27 23:18 .
drwxrwxrwt 6 sys sys 443 May 7 15:35 ..
prw-rw-rw- 1 root root 0 Feb 27 23:18 pcram
# cd ..
# pwd
/tmp
# cd .rpc_door
# ls -a -l
total 32
drwxrwxrwt 2 root root 327 Feb 27 23:18 .
drwxrwxrwt 6 sys sys 443 May 7 15:36 ..
Drw-r--r-- 1 root root 0 Feb 27 23:18 .rpc_100029.1
Drw-r--r-- 1 root root 0 Feb 27 23:18 .rpc_100029.2
Drw-r--r-- 1 root root 0 Feb 27 23:18 .rpc_100029.3
# cd ..
# cd .X11-pipe
# ls -a -l
total 32
drwxrwxr-x 2 root root 176 Feb 27 23:18 .
drwxrwxrwt 6 sys sys 443 May 7 15:37 ..
-rw-rw-rw- 1 root root 0 Feb 27 23:18 X0
# cd ..
# ls
ps_data
# cd .X11-unix
# ls -al
total 32
drwxrwxr-x 2 root root 176 Feb 27 23:18 .
drwxrwxrwt 6 sys sys 443 May 7 15:38 ..
srwxrwxrwx 1 root root 0 Feb 27 23:18 X0
等待您的回答,謝謝
A: 我認為是系統(tǒng)統(tǒng)計信息錯誤的, 本人的經(jīng)驗是當/tmp的使用率超過10%時,系統(tǒng)就
變的很慢了。出現(xiàn)這種情況,首先,要檢查系統(tǒng)中運行的程序有沒有不停分配內(nèi)存,
卻沒有釋放(指自己開發(fā)的程序)。另外看一下系統(tǒng)對/tmp的swap交換情況。使用工
具sar 和iostat 都可以看到。關于sar和iostat的用法, 可以看man即可。
118 Q: 有一用MOTIF 寫的程序,運行之后不能顯示中文(亂碼),由于顯示的信息是
不固定的,故不能使用資源文件.懷疑程序中與創(chuàng)建字體時使用了以下的函數(shù)
有關,但注釋掉后也一樣:
font1=XLoadQueryFont(XtDisplay(toplevel), "-*-screen-bold-r-normal--12-*";
font2=XLoadQueryFont(XtDisplay(toplevel), "-*-screen-bold-r-normal--14-*";
font3=XLoadQueryFont(XtDisplay(toplevel), "-*-screen-bold-r-normal--16-*";
fontlist=XmFontListCreate(font1, "charset1";
fontlist=XmFontListAdd(fontlist, font2, "charset2";
fontlist=XmFontListAdd(fontlist, font3, "charset3");
運行環(huán)境是ULTRA 60 ,Solaris 2.6 ,安裝了中文環(huán)境。編譯環(huán)境是SUN C++ 4.0 。
還懷疑與LANG 相關,曾試過設置為zh ,chinese 等也不行,請教此問題如何解決?
A: 實際上,關于選擇字體和字符集可以看<Font Administrator Guide>;這個資料,使
用系統(tǒng)提供的標準工具來從中間找到系統(tǒng)中存在的字體和字體的名稱。這個資料在
Answer Book 的System Administration Collection 中。 實際上,上面的問題不
出現(xiàn)在字體的選擇上面, 而是在MOTIF中在選擇框的使用設置中還要設置一次字體
119 Q: 請問SUN的E250以上機器支持"雙機熱備+磁盤陣列"的使用方式嗎?Ultra系
列的機器是否也能支持呢?
A: SUN的E250以上機器支持"雙機熱備+磁盤陣列"的使用方式,可以使用
SunCluster軟件實現(xiàn);Netrat系列電信服務器也支持;Ultra系列的機器,不
在支持的列表中。但是,"雙機熱備+磁盤陣列"的具體含義應該搞清楚。推
薦的文檔在sun cluster collection 中。
120 Q: 我在一個JA VA程序中打開50個SOCKET端口,結(jié)果出現(xiàn)異常:
ja va.net.SocketException:Too many open files
請問如何解決此問題?謝謝!另外,請問在一個JA VA進程中可以同時啟動的線
程數(shù)是多少?最大線程數(shù)受什么限制?能否達到240個線程?謝謝!如上問題
如果可以通過修改配置來解決的話,會有什么樣的負面影響?
A: You ha ve two ways to modify the limit number of files that a process
can open simutanously.
One: modify the /etc/system file add the following entry:
set rlim_fd_cur = #n
#n is the number you want. Should be no more than 1024.
You should reboot the machine.
Two: Use the system command: ulimit
$ulimit -n #n
Note: You should use B-shell.
And using the same terminal session(in the same terminal
window) to run the your application program( to guarantee your
application process is a child process of the setting
terminal.)You can man ulimit to see the detailed usaged.
The disadvantage brought by incread the file limite for a
process or the whole system is increasing the system memory
usage. But, for today's machine, this disadvantage is not too
expensive. (William said There is no limit for max open
socket number in Ja va. But the operating system has a limit for
max open file descriptors.A socket resource is treated as a
file descriptor in Unix. The previous email answered your
question. You can try as said.
121 Q: 我想把一個HP平臺上運行的B SHELL 腳本在SOLARIS 2。6上運行,但是出現(xiàn)了
問題:要運行的腳本部分:
command_count = 0
command_item[$command_count]=check_AutoRaid
command_count=`expr $command_count + 1`
command_item[$command_count] = check_system_resource
command_count=`expr $command_count + 1`
command_item[$command_count]= check_diskspace
command_count=`expr $command_count + 1`
command_item[$command_count]= check_bill_record
command_count=`expr $command_count + 1`
相關文章
- Solaris是Sun公司開發(fā)和發(fā)布的一種現(xiàn)代操作系統(tǒng),是UNIX系統(tǒng)的一個重要分支,今天小編為大家?guī)淼氖荢olaris線程模型詳解,希望對大家會有幫助,有需要的朋友一起去看看吧2017-04-06
- 今天小編為大家?guī)淼氖荢olaris iostat詳解,希望對大家會有幫助 ,有需要的朋友一起去看看吧2017-04-06
- 今天小編為大家?guī)淼氖菧\談Solaris技術,希望對大家會有幫助,有需要的朋友一起去看看吧2017-04-06

solaris11如何擴展資源池?solaris11擴展資源池的方法
最近一些朋友問小編solaris11如何擴展資源池?今天小編將為大家分享solaris11擴展資源池的方法!希望對大家會有幫助,有需要的朋友一起去看看吧2017-04-06Solaris10如何更改子網(wǎng)掩碼?Solaris10更改子網(wǎng)掩碼的方法
最近一些朋友在問Solaris10如何更改子網(wǎng)掩碼?下面小編將為大家分享Solaris10更改子網(wǎng)掩碼的方法!希望對大家會有幫助!有需要的朋友一起去看看吧2017-03-19- 今天小編將要為大家?guī)淼氖荢olaris中對tar.z進行安裝卸載詳解!希望對大家會有幫助!有需要的朋友一起去看看吧2017-03-16
如何在solaris中設置分辨率?在solaris中設置分辨率的方法
最近有些朋友問小編如何在solaris中設置分辨率?下面小編將為大家?guī)淼氖窃趕olaris中設置分辨率的方法!希望對大家會有幫助,感興趣的朋友一起去看看吧2017-03-15如何查看solaris系統(tǒng)的版本和位數(shù)?
最近一些朋友問小編如何查看solaris系統(tǒng)的版本和位數(shù)?今天小編將為大家分享查看solaris系統(tǒng)的版本和位數(shù)的方法!希望對大家會有幫助,有需要的朋友一起去看看吧2017-03-14整理Solaris系統(tǒng)與Linux系統(tǒng)常用命令的區(qū)別
這篇文章主要介紹了Solaris系統(tǒng)與Linux系統(tǒng)常用命令的區(qū)別,Linux作為Unix的仿制品,其命令會與作為Unix發(fā)行版的Solaris有諸多相同點,而本文則關注它們的相異之處,需要的朋友2016-02-05windows XP+Fedora 8+solaris 11三系統(tǒng)安裝攻略
介紹windows XP+Fedora 8+solaris 11三系統(tǒng)安裝攻略2014-06-16


