顯示具有 unix 標籤的文章。 顯示所有文章
顯示具有 unix 標籤的文章。 顯示所有文章

星期三, 1月 23, 2013

[轉載] Xmanager/Xming 連接Solaris 10 OS

原作者已經不可考

Xmanager 以Xstatic Session 的圖形方式連接 Solaris 10系統,需要Solaris 10開啟177 port,但是有時候在安裝的時候沒有

開啟177服務port,可以通過如下辦法來開放177port。

1. 進入/etc/X11/gdm
編輯gdm.conf檔 編輯如下2個地方
找到[xdmcp]欄位.
將Enable=flase改為true
將Port=177前的注釋取消
然後保存退出.

2.ps-ef|grep gdm 確認目前沒有gdm進程.如有殺之

3. 啟動gdm服務
# svcs -a|grep gdm
disabled Aug_07 svc:/application/gdm2-login:default
# svcadm enable svc:/application/gdm2-login:default

4.設定
X window自動啓動
# /usr/dt/bin/dtconfig -e (enable)


星期四, 8月 09, 2012

Solaris 10 cron job 達到最大限制

/var/cron/log:
root# tail -100 log |more
! c queue max run limit reached Thu Apr 26 09:21:00 2012
! rescheduling a cron job Thu Apr 26 09:21:00 2012
! c queue max run limit reached Thu Apr 26 09:21:00 2012
.
.
.


vi /etc/cron.d/queuedefs
putting an entry like this will bump the limit from 100 to 500:
c.500j2n30w <==此行是手動加上去的 , 改到五百筆

root# svcs -a |grep cron
online Apr_09 svc:/system/cron:default
root# svcadm restart svc:/system/cron:default


星期四, 7月 26, 2012

IBM Aix 5 帳號解鎖方法

解鎖:
以某帳號登入系統時發現
aix 3004-303 There have been too many unsuccessful login attempts

關於被鎖住的帳號裡 , 把 unsuccessful_login_count 修改為0
再用該帳號登入即可:
vi /etc/security/lastlog
unsuccessful_login_count = 0
histsize = 3  ==> 三代內不能重複

星期一, 3月 05, 2012

線上修改 Aix user limits 方法


AIX 5.3上

下面是檔/etc/security/limits檔裡面有關軟限制和硬限制的部分。

*
* Sizes are in multiples of 512 byte blocks, CPU time is in seconds
*
* fsize      - soft file size in blocks
* core       - soft core file size in blocks
* cpu        - soft per process CPU time limit in seconds
* data       - soft data segment size in blocks
* stack      - soft stack segment size in blocks
* rss        - soft real memory usage in blocks
* nofiles    - soft file descriptor limit
* fsize_hard - hard file size in blocks
* core_hard  - hard core file size in blocks
* cpu_hard   - hard per process CPU time limit in seconds
* data_hard  - hard data segment size in blocks
* stack_hard - hard stack segment size in blocks
* rss_hard   - hard real memory usage in blocks
* nofiles_hard - hard file descriptor limit
* The following table contains the default hard values if the
* hard values are not explicitly defined:
*
*   Attribute        Value
*   ==========    ============
*   fsize_hard    set to fsize
*   cpu_hard      set to cpu
*   core_hard         -1
*   data_hard         -1
*   stack_hard      8388608
*   rss_hard          -1
*   nofiles_hard      -1
default:
        fsize = -1
        core = 2097151
        cpu = -1
        data = -1
        rss = -1
        stack = -1
        nofiles = 2000

說明:
1.ulimit -Ha 輸出硬限制的值
time(seconds)        unlimited
file(blocks)         unlimited
data(kbytes)         unlimited
stack(kbytes)        4194304
memory(kbytes)       unlimited
coredump(blocks)     unlimited
nofiles(descriptors) unlimited
因為在/etc/security/limits沒有明確寫明對硬限制的設置,所以,取默認的硬限制的值,也就是上面注釋文字 裡 面寫的那些,stack還是有限制的。
2.
ulimit -a 輸出軟限制的值
time(seconds)        unlimited
file(blocks)         unlimited
data(kbytes)         unlimited
stack(kbytes)        4194304
memory(kbytes)       unlimited
coredump(blocks)     2097151
nofiles(descriptors) 2000
軟限制取/etc/security/limits 裡 面default 裡 面的值,雖然 裡 面寫的stack沒限制,但是由於硬限制已經提前限制了41944304,所以,stack的最大也只能是41944304。

3.如何更改硬限制和軟限制的值?
1) 編輯檔/etc/security/limits,直接修改各定義值。此更改在用戶退出重新登陸就生效。
2) 使用命令ulimit修改預設值。例如:
ulimit -f value
ulimit -c
ulimit -t
ulimit -d
ulimit -s
ulimit -m
ulimit -n
將修改fsize, core, cpu,data, stack, rss和nofiles的soft limit值。
3) 使用命令chuser修改某用戶的限定值。例如:
chuser fsize=
chuser core=
chuser data=
chuser limit=
chuser rss=
chuser nofiles=
將用戶"username"的soft limits改為值"value"。
chuser hard_fsize=
chuser hard_core=
chuser hard_cpu=
chuser hard_data=
chuser hard_limit=
chuser hard_rss=
chuser hard_nofiles=
將用戶"username"的hard limits改為值"value"。
4)打smit chuser 裡面也是可以修改的


--
例如要修改AP Server 的連線數 或DB 的連線數
將其由2048 ==>4096 :


 chuser nofiles=4096 oracle
 chuser hard_nofiles=4096 oracle


# lsattr -El sys0 |grep maxuproc
maxuproc 1024 Maximum number of PROCESSES allowed per user True
# chdev -l sys0 -a maxuproc=4096
sys0 changed
# lsattr -El sys0 |grep maxuproc
maxuproc 4096 Maximum number of PROCESSES allowed per user True
#

星期五, 3月 02, 2012

Configuring TCP KeepAlive Parameters[轉載]

Configuring TCP KeepAlive Parameters

Last Update: 19 June 2008
Product: StarLicense for Windows/UNIX 
Version: 1.07 or later 
Article ID: SQV00SL002

Abstract

The StarLicense server uses the settings for the TCP KeepAlive parameter to clean up connections from clients that have disconnected without releasing a license that has been checked out. You can change the TCP KeepAlive parameter if you need the abandoned license checkouts to be cleaned up more frequently.

Solution

The StarLicense server uses the system TCP/IP KeepAlive parameter settings to clean up connections from clients that have disconnected from the network without releasing the StarQuest product license that was checked out by the computer. The default values for the KeepAlive parameter should be sufficient for most users, but you can change them if necessary, such as to clean up abandoned license connections more frequently. The KeepAlive parameter names vary by operating system but generally specify:
  • the interval to wait before probing the idle connection (on most platforms the default is 2 hours)
  • the interval to wait before retrying the probe after an initial failure to respond
  • the maximum number of times to retry the probe
Modifying the KeepAlive parameter settings may affect the operation of other applications on the computer. You also may want to set additional TCP/IP parameters that affect TCP connections, depending on the overall impact to other TCP/IP parameters after you modify the KeepAlive settings.
The method of changing the KeepAlive parameter settings varies by operating system, so refer to your system documentation for details. This technical document describes the general steps for displaying and modifying the KeepAlive parameter for the platforms on which the StarLicense server supports.
The following table shows the names of the KeepAlive parameters for each supported operating system.
Table 1: Keepalive Parameters by Operating System
Operating System
Parameter wait time before probing the connection
Parameter interval between retry probes
Parameter maximum retry probes
Unit of measure
AIX
tcp_keepidle
tcp_keepintvl
n/a
half-seconds
FreeBSD
TCPTV_KEEP_IDLE
TCPTV_KEEPINTVL
TCPTV_KEEPCNT 
seconds
HP-UX 11i
tcp_time_wait_interval
tcp_keepalive_interval
tcp_keepalives_kill (1)
milliseconds
Linux
tcp_keepalive_time
tcp_keepalive_intvl
tcp_keepalive_probes
seconds
Solaris
tcp_time_wait_interval
tcp_keepalive_interval
n/a
milliseconds
Windows
KeepAliveTime
KeepAlive Interval
TcpMaxDataRetransmission
milliseconds
(1): tcp_keepalives_kill cannot be modified on HP. It is set to 1.

Displaying and Modifying KeepAlive Values

Follow these steps to modify the values.
1.       Log in as root on a UNIX-based computer or as an Administrator on a Windows computer.
2.       Refer to the information for the operating system you are using, as suggested in the following table, to display information about the network tuning parameters.
Platform
Operating System Command
AIX
no -a
HP-UX 11i
ndd -h supported
FreeBSD
Examine /usr/src/sys/netinet/tcp_timer.h and tcp_timer.c
Linux
sysctl -h
Sun Solaris
ndd /dev/tcp \?
Windows
3.       Display the current KeepAlive settings, replacing <tcp_parameter> with the names shown in Table 1 for each platform.
Platform
Operating System Command
AIX
no -o<tcp_parameter>
FreeBSD
Examine /usr/src/sys/netinet/tcp_timer.h and tcp_timer.c
HP-UX 11i
ndd -get /dev/tcp <tcp_parameter>
Linux
sysctl net.ipv4.<tcp_parameter>
Sun Solaris
ndd -get /dev/tcp <tcp_parameter>
Windows
From the Start menu, choose Run and enter regedit to view the parameter located in the Registry file HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters
4.       Display the range of available settings.
Platform
Operating System Command
AIX
This option is not available.
FreeBSD
This option is not available.
HP-UX 11i
ndd -h <tcp_parameter>
Linux
This option is not available.
Sun Solaris
This option is not available.
Windows
5.       Modify the KeepAlive values as desired.
Platform
Operating System Command
AIX
no -o <tcp_parameter>= <tcp _value>
FreeBSD
Modify /usr/src/sys/netinet/tcp_timer.h and rebuild the kernel.
HP-UX 11i
ndd -set /dev/tcp <tcp_parameter> <tcp_value>
Linux
To set the value temporarily until the computer is restarted: 
sysctl -w net.ipv4.<tcp_parameter> = <tcp_value> 
To make the change permanently:
Update /etc/sysctl.conf with net.ipv4.<tcp_parameter> = <tcp_value> and issue one of the following commands, depending on which version of Linux you are running:
Red Hat: chkconfig sysctl on
Suse: chkconfig boot.sysctl on
Sun Solaris
ndd -set /dev/tcp <tcp_parameter> <tcp_value>
Windows
Run regedit to edit the Windows Registry key located in the pathHKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters.
After you change the Registry value you must restart the computer for the change to take affect.


DISCLAIMER

The information in technical documents comes without any warranty or applicability for a specific purpose. The author(s) or distributor(s) will not accept responsibility for any damage incurred directly or indirectly through use of the information contained in these documents. The instructions may need to be modified to be appropriate for the hardware and software that has been installed and configured within a particular organization.  The information in technical documents should be considered only as an example and may include information from various sources, including IBM, Microsoft, and other organizations.

星期一, 1月 09, 2012

ORA-12540 "internal limit restriction exceeded" @Aix

以 sqlplus / as sysdba 登入後發現以下訊息

ORA-12540  "internal limit restriction exceeded"

查了一下listener log 並沒滿. 
資料庫參數process , session 放大到2048 所以也沒問題.
檔案空間也沒滿.

用 ps -ef |grep LOCAL=NO|wc  查外部連到Oracle的連線數到達512,可能達到OS kernel限制了


以下為調整指令(可線上調整 , 調整特定user 能fork 的process數量限制 ) 
lsattr -E -l sys0 |grep maxuproc
chdev -l sys0 -a maxuproc=1024


Ref.

LinkWithin-相關文件

Related Posts Plugin for WordPress, Blogger...