Thursday, September 5, 2013
How to check HBA ports WWN on Solaris10 system
World wide name(WWN) for an adapter displayed in Solaris10 using command "fcinfo"
root@HOSTA# fcinfo
Usage: fcinfo -?,-V
Usage: fcinfo [-?]
-------------------------------------------------------------------
root@HOSTA# fcinfo hba-port
HBA Port WWN: 21000024ff2cd760
OS Device Name: /dev/cfg/c1
Manufacturer: QLogic Corp.
Model: XXX-4325-XX
Firmware Version: 4.04.01
FCode/BIOS Version: BIOS: 2.2; fcode: 2.3; EFI: 2.1;
Serial Number: XXXXR00-10XXXX5006
Driver Name: qlc
Driver Version: 20XXXX17-2.29
Type: N-port
State: online
Supported Speeds: 2Gb 4Gb 8Gb
Current Speed: 4Gb
Node WWN: 20000024ff2cd760
HBA Port WWN: 21000024ff2cd761
OS Device Name: /dev/cfg/c2
Manufacturer: QLogic Corp.
Model: 371-XXXX-02
Firmware Version: 4.04.01
FCode/BIOS Version: BIOS: 2.2; fcode: 2.3; EFI: 2.1;
Serial Number: 0XXXR00-1XXXX85XX6
Driver Name: qlc
Driver Version: 2XXXX617-2.29
Type: N-port
State: online
Supported Speeds: 2Gb 4Gb 8Gb
Current Speed: 4Gb
Node WWN: 20000024ff2cd761
-------------------------------------------------------------------
Show only WWN:
root@HOSTA# fcinfo hba-port
HBA Port WWN: 21000024ff2cd760
HBA Port WWN: 21000024ff2cd761
Friday, October 28, 2011
Configuring DSCP on SPARC Enterprise(XSCF)
Configuring DSCP
The Sun SPARC Enterprise Server Administration Guide explains how to set up DSCP, but it is really quite simple. The easiest method is using the syntax:setdscp -i NETWORK -m NETMASKChoose a network address (be sure to pick a subnet that is not in use at your facility) and the corresponding netmask, and
setdscp will do the rest. For example, in my lab the subnet 192.168.244.0 is unused, so I do:XSCF> setdscp -i 192.168.224.0 -m 255.255.255.0There are other ways to set up the DSCP network addresses, but this is really the best approach.
setdscp will assign an IP address to the SP, and reserve one IP address for every possible domain (the M9000-64 supports 24 domains, so a maximum of 25 IP addresses are reserved). A common question that's asked is, if you're running PPP between the SP and each domain, don't you need to two addresses for each domain, one for the domain and one for the SP? No, not really. Since routing is done based on the destination address, we can get away with using the same IP address for the SP on every PPP link. So technically speaking, the NETWORK and NETMASK are not defining a DSCP subnet; they are defining a range of IP addresses from which DSCP selects endpoint addresses. A subtle difference, but still a difference.
On the SP, showdscp will display the IP addresses assigned to each domain and the SP, for example:
XSCF> showdscp DSCP Configuration: Network: 192.168.224.0 Netmask: 255.255.255.0 Location Address ---------- --------- XSCF 192.168.224.1 Domain #00 192.168.224.2 Domain #01 192.168.224.3 Domain #02 192.168.224.4 Domain #03 192.168.224.5In Solaris, the
prtdscp(1M) command will display the IP address of that domain and the SP (prtdscp is located in /usr/platform/SUNW,SPARC-Enterprise/sbin). You can get the same basic information from ifconfig sppp0:% /usr/platform/SUNW,SPARC-Enterprise/sbin/prtdscp Domain Address: 192.168.224.2 SP Address: 192.168.224.1 % ifconfig sppp0 sppp0: flags=10010008d1 mtu 1500 index 3 inet 192.168.224.2 --> 192.168.224.1 netmask ffffff00
Friday, October 7, 2011
ZFS - Pool, Filesystem, RAID, Snapshots, Clones and Troubleshooting ZFS
[ZFS - Pool, Filesystem, RAID, Snapshots, Clones and Troubleshooting ZFS]
ZFS Management
ZFS was first publicly released in the 6/2006 distribution of Solaris 10. Previous versions of Solaris 10 did not include ZFS.
ZFS is flexible, scalable and reliable. It is a POSIX-compliant filesystem with several important features:
- integrated storage pool management
- data protection and consistency, including RAID
- integrated management for mounts and NFS sharing
- scrubbing and data integrity protection
- snapshots and clones
- advanced backup and restore features
- excellent scalability
- built-in compression
- maintenance and troubleshooting capabilities
- automatic sharing of disk space and I/O bandwidth across disk devices in a pool
- endian neutrality
No separate filesystem creation step is required. The mount of the filesystem is automatic and does not require vfstab maintenance. Mounts are controlled via the mountpoint attribute of each file system.
Pool Management
Members of a storage pool may either be hard drives or slices of at least 128MB in size.
To create a mirrored pool:
zpool create -f pool-name mirror c#t#d# c#t#d#
To check a pool's status, run:zpool status -v pool-name
To list existing pools:
zpool list
To remove a pool and free its resources:
zpool destroy pool-name
A destroyed pool can sometimes be recovered as follows:zpool import -D
Additional disks can be added to an existing pool. When this happens in a mirrored or RAID Z pool, the ZFS is resilvered to redistribute the data. To add storage to an existing mirrored pool:
zpool add -f pool-name mirror c#t#d# c#t#d#
Pools can be exported and imported to transfer them between hosts.zpool export pool-name
zpool import pool-name
Without a specified pool, the import command lists available pools. zpool import
To clear a pool's error count, run:
zpool clear pool-name
Although virtual volumes (such as those from DiskSuite or VxVM) can be used as base devices, it is not recommended for performance reasons.
Filesystem Management
Similar filesystems should be grouped together in hierarchies to make management easier. Naming schemes should be thought out as well to make it easier to group administrative commands for similarly managed filesystems.
When a new pool is created, a new filesystem is mounted at /pool-name.
To create another filesystem:
zfs create pool-name/fs-name
To delete a filesystem:
zfs destroy filesystem-name
To rename a ZFS filesystem:zfs rename old-name new-name
Properties are set via the zfs set command.
To turn on compression:zfs set compression=on pool-name/filesystem-name
To share the filesystem via NFS:zfs set sharenfs=on pool-name/fs-name
zfs set sharenfs="mount-options " pool-name/fs-name
Rather than editing the /etc/vfstab:
zfs set mountpoint= mountpoint-name pool-name/filesystem-name
Quotas are also set via the same command:zfs set quota=#gigG pool-name/filesystem-name
RAID Levels
ZFS filesystems automatically stripe across all top-level disk devices. (Mirrors and RAID-Z devices are considered to be top-level devices.) It is not recommended that RAID types be mixed in a pool. (zpool tries to prevent this, but it can be forced with the -f flag.)
The following RAID levels are supported:
- RAID-0 (striping)
- RAID-1 (mirror)
- RAID-Z (similar to RAID 5, but with variable-width stripes to avoid the RAID 5 write hole)
- RAID-Z2
The zfs man page recommends 3-9 disks for RAID-Z pools.
Performance Monitoring
ZFS performance management is handled differently than with older generation file systems. In ZFS, I/Os are scheduled similarly to how jobs are scheduled on CPUs. The ZFS I/O scheduler tracks a priority and a deadline for each I/O. Within each deadline group, the I/Os are scheduled in order of logical block address.
Writes are assigned lower priorities than reads, which can help to avoid traffic jams where reads are unable to be serviced because they are queued behind writes. (If a read is issued for a write that is still underway, the read will be executed against the in-memory image and will not hit the hard drive.)
In addition to scheduling, ZFS attempts to intelligently prefetch information into memory. The algorithm tries to pick information that is likely to be needed. Any forward or backward linear access patterns are picked up and used to perform the prefetch.
The zpool iostat command can monitor performance on ZFS objects:
- USED CAPACITY: Data currently stored
- AVAILABLE CAPACITY: Space available
- READ OPERATIONS: Number of operations
- WRITE OPERATIONS: Number of operations
- READ BANDWIDTH: Bandwidth of all read operations
- WRITE BANDWIDTH: Bandwidth of all write operations
The health of an object can be monitored withzpool status
Snapshots and Clones
To create a snapshot:
zfs snapshot pool-name/filesystem-name@ snapshot-name
To clone a snapshot:
zfs clone snapshot-name filesystem-name
To roll back to a snapshot:
zfs rollback pool-name/filesystem-name@snapshot-name
zfs send and zfs receive allow clones of filesystems to be sent to a development environment.
The difference between a snapshot and a clone is that a clone is a writable, mountable copy of the file system. This capability allows us to store multiple copies of mostly-shared data in a very space-efficient way.
Each snapshot is accessible through the .zfs/snapshot in the /pool-name directory. This can allow end users to recover their files without system administrator intervention.
Zones
If the filesystem is created in the global zone and added to the local zone via zonecfg, it may be assigned to more than one zone unless the mountpoint is set to legacy.
zfs set mountpoint=legacy pool-name/filesystem-name
To import a ZFS filesystem within a zone:zonecfg -z zone-name
add fsset dir=mount-point
set special=pool-name/filesystem-name
set type=zfsendverify
commit
exit
Administrative rights for a filesystem can be granted to a local zone:
zonecfg -z zone-name
add datasetset name=pool-name/filesystem-name
end
commitexit
Data Protection
ZFS is a transactional file system. Data consistency is protected via Copy-On-Write (COW). For each write request, a copy is made of the specified block. All changes are made to the copy. When the write is complete, all pointers are changed to point to the new block.
Checksums are used to validate data during reads and writes. The checksum algorithm is user-selectable. Checksumming and data recovery is done at a filesystem level; it is not visible to applications. If a block becomes corrupted on a pool protected by mirroring or RAID, ZFS will identify the correct data value and fix the corrupted value.
Raid protections are also part of ZFS.
Scrubbing is an additional type of data protection available on ZFS. This is a mechanism that performs regular validation of all data. Manual scrubbing can be performed by:
zpool scrub pool-name
The results can be viewed via:zpool status
Any issues should be cleared with:zpool clear pool-name
The scrubbing operation walks through the pool metadata to read each copy of each block. Each copy is validated against its checksum and corrected if it has become corrupted.
Hardware Maintenance
To replace a hard drive with another device, run:zpool replace pool-name old-disk new-disk
To offline a failing drive, run:zpool offline pool-name disk-name
(A -t flag allows the disk to come back online after a reboot.)
Once the drive has been physically replaced, run the replace command against the device:zpool replace pool-name device-name
After an offlined drive has been replaced, it can be brought back online:zpool online pool-name disk-name
Firmware upgrades may cause the disk device ID to change. ZFS should be able to update the device ID automatically, assuming that the disk was not physically moved during the update. If necessary, the pool can be exported and re-imported to update the device IDs.
Troubleshooting ZFS
The three categories of errors experienced by ZFS are:
- missing devices: Missing devices placed in a "faulted" state.
- damaged devices: Caused by things like transient errors from the disk or controller, driver bugs or accidental overwrites (usually on misconfigured devices).
- data corruption: Data damage to top-level devices; usually requires a restore. Since ZFS is transactional, this only happens as a result of driver bugs, hardware failure or filesystem misconfiguration.
It is important to check for all three categories of errors. One type of problem is often connected to a problem from a different family. Fixing a single problem is usually not sufficient.
Data integrity can be checked by running a manual scrubbing:zpool scrub pool-namezpool status -v pool-name
checks the status after the scrubbing is complete.
The status command also reports on recovery suggestions for any errors it finds. These are reported in the action section. To diagnose a problem, use the output of the status command and the fmd messages in /var/adm/messages.
The config section of the status section reports the state of each device. The state can be:
- ONLINE: Normal
- FAULTED: Missing, damaged, or mis-seated device
- DEGRADED: Device being resilvered
- UNAVAILABLE: Device cannot be opened
- OFFLINE: Administrative action
The status command also reports READ, WRITE or CHKSUM errors.
To check if any problem pools exist, usezpool status -x
This command only reports problem pools.
If a ZFS configuration becomes damaged, it can be fixed by running export and import.
Devices can fail for any of several reasons:
- "Bit rot:" Corruption caused by random environmental effects.
- Misdirected Reads/Writes: Firmware or hardware faults cause reads or writes to be addressed to the wrong part of the disk.
- Administrative Error
- Intermittent, Sporadic or Temporary Outages: Caused by flaky hardware or administrator error.
- Device Offline: Usually caused by administrative action.
Once the problems have been fixed, transient errors should be cleared:
zpool clear pool-name
In the event of a panic-reboot loop caused by a ZFS software bug, the system can be instructed to boot without the ZFS filesystems:boot -m milestone=none
When the system is up, remount / as rw and remove the file /etc/zfs/zpool.cache. The remainder of the boot can proceed with the
svcadm milestone all command. At that point import the good pools. The damaged pools may need to be re-initialized.
Scalability
The filesystem is 128-bit. 256 quadrillion zetabytes of information is addressable. Directories can have up to 256 trillion entries. No limit exists on the number of filesystems or files within a filesystem.
ZFS Recommendations
Because ZFS uses kernel addressable memory, we need to make sure to allow enough system resources to take advantage of its capabilities. We should run on a system with a 64-bit kernel, at least 1GB of physical memory, and adequate swap space.
While slices are supported for creating storage pools, their performance will not be adequate for production uses.
Mirrored configurations should be set up across multiple controllers where possible to maximize performance and redundancy.
Scrubbing should be scheduled on a regular basis to identify problems before they become serious.
When latency or other requirements are important, it makes sense to separate them onto different pools with distinct hard drives. For example, database log files should be on separate pools from the data files.
Root pools are not yet supported in the Solaris 10 6/2006 release, though they are anticipated in a future release. When they are used, it is best to put them on separate pools from the other filesystems.
On filesystems with many file creations and deletions, utilization should be kept under 80% to protect performance.
The recordsize parameter can be tuned on ZFS filesystems. When it is changed, it only affects new files. zfs set recordsize=size tuning can help where large files (like database files) are accessed via small, random reads and writes. The default is 128KB; it can be set to any power of two between 512B and 128KB. Where the database uses a fixed block or record size, the recordsize should be set to match. This should only be done for the filesystems actually containing heavily-used database files.
In general, recordsize should be reduced when iostat regularly shows a throughput near the maximum for the I/O channel. As with any tuning, make a minimal change to a working system, monitor it for long enough to understand the impact of the change, and repeat the process if the improvement was not good enough or reverse it if the effects were bad.
The ZFS Evil Tuning Guide contains a number of tuning methods that may or may not be appropriate to a particular installation. As the document suggests, these tuning mechanisms will have to be used carefully, since they are not appropriate to all installations.
For example, the Evil Tuning Guide provides instructions for:- Turning off file system checksums to reduce CPU usage. This is done on a per-file system basis:
zfs set checksum=off filesystem - Limiting the ARC size by setting
set zfs:zfs_arc_max
in/etc/systemon 8/07 and later. - If the I/O includes multiple small reads, the file prefetch can be turned off by setting
zfs:zfs_prefetch_disable
on 8/07 and later. - If the I/O channel becomes saturated, the device level prefetch can be turned off with
set zfs:zfs_vdev_cache_bshift = 13
in/etc/systemfor 8/07 and later - I/O concurrency can be tuned by setting
set zfs:zfs_vdev_max_pending = 10
in/etc/systemin 8/07 and later. - If storage with an NVRAM cache is used, cache flushes may be disabled with
set zfs:zfs_nocacheflush = 1
in/etc/systemfor 11/06 and later. - ZIL intent logging can be disabled. (WARNING: Don't do this.)
- Metadata compression can be disabled. (Read this section of the Evil Tuning Guide first-- you probably do not need to do this.)
zfs set checksum='on | fletcher2 | fletcher4 | sha256' filesystemSun Cluster Integration
ZFS can be used as a failover-only file system with Sun Cluster installations.
If it is deployed on disks also used by Sun Cluster, do not deploy it on any Sun Cluster quorum disks. (A ZFS-owned disk may be promoted to be a quorum disk on current Sun Cluster versions, but adding a disk to a ZFS pool may result in quorum keys being overwritten.)
ZFS Internals
Max Bruning wrote an excellent paper on how to examine the internals of a ZFS data structure. (Look for the article on the ZFS On-Disk Data Walk.) The structure is defined in ZFS On-Disk Specification.
Some key structures:
uberblock_t: The starting point when examining a ZFS file system. 128k array of 1kuberblock_tstructures, starting at 0x20000 bytes within a vdev label. Defined inuts/common/fs/zfs/sys/uberblock_impl.hOnly one uberblock is active at a time; the active uberblock can be found with
zdb -uuu zpool-nameblkptr_t: Locates, describes, and verifies blocks on a disk. Defined inuts/common/fs/zfs/sys/spa.h.dnode_phys_t: Describes an object. Defined byuts/common/fs/zfs/sys/dmu.hobjset_phys_t: Describes a group of objects. Defined byuts/common/fs/zfs/sys/dmu_objset.h- ZAP Objects: Blocks containing name/value pair attributes. ZAP stands for ZFS Attribute Processor. Defined by
uts/common/fs/zfs/sys/zap_leaf.h - Bonus Buffer Objects:
dsl_dir_phys_t: Contained in a DSL directorydnode_phys_t; contains object ID for a DSL datasetdnode_phys_tdsl_dataset_phys_t: Contained in a DSL datasetdnode_phys_t; contains ablkprt_tpointing indirectly at a second array ofdnode_phys_tfor objects within a ZFS file system.znode_phys_t: In the bonus buffer of dnode_phys_t structures for files and directories; contains attributes of the file or directory. Similar to a UFS inode in a ZFS context.
[ZFS - Pool, Filesystem, RAID, Snapshots, Clones and Troubleshooting ZFS]
Refer: princeton. edu/~unix/Solaris/troubleshoot/zfs.html
Tuesday, August 10, 2010
Solaris Port Numbers
Solaris Port Numbers
This page lists the common port numbers for a Solaris server.
| Service | Port Number | TCP/UDP |
| echo | 7 | tcp/udp |
| ftp-data | 20 | tcp |
| ftp | 21 | tcp |
| telnet | 23 | tcp |
| smtp | 25 | tcp |
| time | 37 | tcp/udp |
| name | 42 | udp |
| tftp | 69 | udp |
| pop3 | 110 | tcp |
| nntp | 119 | tcp |
| ntp | 123 | tcp/udp |
| nfsd | 2049 | tcp/udp |
| lockd | 4045 | tcp/udp |
Monday, July 19, 2010
Script to re-using tapes from other systems or older Netbackups
Run the following script:
root@servlet# ./manual_expired_tape.ksh expired_tape_list.cfg
Output:
Mon Jul 19 12:18:02 ICT 2010
1) expiring PU302 ...
2) expiring PL319 ...
3) expiring PL313 ...
4) expiring PL315 ...
5) expiring PL324 ...
6) expiring PQ323 ...
7) expiring PM328 ...
Mon Jul 19 12:18:02 ICT 2010
Done.
_______________________________________
Coding
File Name: manual_expired_tape.ksh
#!/usr/bin/ksh
#Create Date: 2010-07-19
# Re-using Tapes from other systems or older Netbackups
#Usage: ./manual_expired_tape.ksh
# ./manual_expired_tape.ksh expired_tape_list.cfg
#-Check Param
if [ $# -eq 0 ]
then
#TAPE_LABEL_LIST=expired_tape_list.cfg
echo "\n Usage: ./manual_expired_tape.ksh
echo " ./manual_expired_tape.ksh expired_tape_list.cfg\n"
echo "Exit!"
exit 1
else
TAPE_LABEL_LIST=$1
fi
#-Check file exist!
date
if [ -f $TAPE_LABEL_LIST ] && [ -s $TAPE_LABEL_LIST ]
then
TAPELABEL=`cat ${TAPE_LABEL_LIST}` # Initialise a tape label.
count=0 # Initialise a counter
for tapeid in ${TAPELABEL} # Set up a loop control
do # Begin the loop
count=`expr $count + 1` # Increment the counter
echo "$count) expiring $tapeid ..." # Display the result
#Moving tapes to the scratch pool
echo "/usr/openv/netbackup/bin/admincmd/bpexpdate -m $tapeid -d 0 -force"
done # End of loop
date
echo "Done."
else
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "$TAPE_LABEL_LIST : File does not exist or File is empty."
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
fi
#############################################
Config File Name: expired_tape_list.cfg
PU302
PL319
PL313
PL315
PL324
PQ323
PM328
#######################################
Edit Tape label in config file and run script.
Starting and Stopping Netbackup(Veritas Netbackup)
Stopping Netbackup
• /usr/openv/netbackup/bin/K77netbackup –> graceful shutdown
• /usr/openv/netbackup/bin/bpps -a –> check for any remaining processes
• /usr/openv/netbackup/bin/goodies/bp.kill_all —> kills all remaining netbackup processes, not
necessarily graceful
• /usr/openv/netbackup/bin/bpps -a –> check for any remaining processes
• kill -9
Starting Netbackup
• /usr/openv/netbackup/bin/S77netbackup –> after bp.kill_all, to restart
Thursday, March 25, 2010
Plink - PuTTY Link: command-line connection utility
Release 0.60
Usage: plink [options] [user@]host [command]
("host" can also be a PuTTY saved session name)
Options:
-V print version information and exit
-pgpfp print PGP key fingerprints and exit
-v show verbose messages
-load sessname Load settings from saved session
-ssh -telnet -rlogin -raw
force use of a particular protocol
-P port connect to specified port
-l user connect with specified username
-batch disable all interactive prompts
The following options only apply to SSH connections:
-pw passw login with specified password
-D [listen-IP:]listen-port
Dynamic SOCKS-based port forwarding
-L [listen-IP:]listen-port:host:port
Forward local port to remote address
-R [listen-IP:]listen-port:host:port
Forward remote port to local address
-X -x enable / disable X11 forwarding
-A -a enable / disable agent forwarding
-t -T enable / disable pty allocation
-1 -2 force use of particular protocol version
-4 -6 force use of IPv4 or IPv6
-C enable compression
-i key private key file for authentication
-noagent disable use of Pageant
-agent enable use of Pageant
-m file read remote command(s) from file
-s remote command is an SSH subsystem (SSH-2 only)
-N don't start a shell/command (SSH-2 only)
-nc host:port
open tunnel in place of session (SSH-2 only)
Download: http://tartarus.org/~simon/putty-snapshots/x86/plink.exe
For example:
C:> plink.exe -ssh 102.34.112.17 -P 22 -l admin -pw password "/tmp/scriptfile.ksh"
Wednesday, October 7, 2009
Sendmail Quick Reference
Tips and Tricks for Sendmail
mailq – Prints the mail queue's contents, same as /usr/lib/sendmail –bp
newaliases – Rebuilds the aliases database file, same as /usr/lib/sendmail –bi
hoststat – Prints persistent host status info, same as /usr/lib/sendmail -bh
purgestat – Purges (zeroes) persistent host status info, same as /usr/lib/sendmail -bH
smtpd – Runs in daemon mode, same as /usr/lib/sendmail –bd –q30
mailq –OmaxQueueRunSize=1 - Quickly print the total number of messages within mail queue
/usr/lib/sendmail –q –Otimeout.queuereturn=99d - Purges the mail queue without timing out any messages. Useful if the mail server has been down longer than the queuereturn value set in the cf.
/usr/lib/sendmail –bv foolist | grep –v deliverable - Prints only undeliverable addresses from in the mail list foolist. Great for use in a shell script to remove badd addresses from a mailing list.
Command Line Switches
-B 7bit - Causes sendmail to clear the high-bit of every incoming byte.
-B 8bitmime – Causes sendmail to preserve the high-bit or every incoming byte.
-ba – Uses ARPAnet/Grey-Book protocols to transfer mail.
-bD – Runs as daemon, like –bd, but does not fork and does not detach from controlling terminal.
-bd – Runs as daemon, forks and detaches.
-bH - Purges (zeroes) persistent host status info.
-bh - Prints persistent host status info.
-bi - Initializes the aliases database.
-bm – Causes sendmail to read and send message (this is the default)
-bp – Prints the contents of the mail queue.
-bs – Runs sendmail on standard I/O.
-bt – Runs sendmail in rule testing mode.
-bv - Verifies address.
-C /tmp/different.cf – Uses different.cf as its configuration file.
-c - Sets HoldExpensive option to true.
-d- set debug mode. - Set senders address
* -d0 – Shows general config
* -d0.1 – Prints version
* -d.04 – Prints local hostname and any aliases for it.
* -d0.15 – Prints the list of delivery agents declared
* -d0.20 – Prints address of each network interface
* -d8 – Traces most DNS lookups
* -d8.1 – Prints failure of low level MX searches.
* -d8.2 – Prints calls to getcanonname
* -d8.3 - Traces dropped local hostnames
* -d8.5 – Shows hostnames tried in getcanonname
* -d8.8 – Shows when MX lookups return the wrong type.
* -d11 – Traces delivery agent calls
* -d11.1 – Traces arguments passed to the delivery agent
* -d11.2 - Prints the user ID that the delivery agent is invoked as
* -d21 – Traces rewriting of addresses
* -d21.1- Traces general ruleset rewriting
* -d21.2 – Traces use of $& macro
* -d21.3 – Shows $> subroutines called
* -d21.4 – Displays result of rewrite
* -d21.15 – Shows $digit replacement
* -d21.35 – shows token by token LHS matching
* -d27 – Traces aliasing
* -d27.1 – Traces general aliasing
* -d27.2 – Traces :include: files, alias self-references, and errors on home
* -d27.3 – Traces the ~/.forward path and the alias wait
* -d27.4 – Prints "not safe" when a file is unsafe to trust
* -d27.9 – Shows uid/gid changes when reading :include: files
* -d35 – Traces macros
* -d35.9 shows macro values as they are defined
* -d35.14 – Shows macro names being converted to integer id’s
* -d35.24 – Shows macro expansion
* -d37 – Traces options and class macros
* -d37.1 – Traces the setting of options
* -d37.8 – Traces the adding of words to a class
* -d41 – Traces the queue
* -d41.1 – Traces queue ordering
* -d41.2 – Shows failure to open qf files
* -d41.49 – Shows skipped queue files
* -d41.50 – Show every file in queue
-F- Set senders full name
-f
-h- Set minimum hop count
-i – Set IgnoreDots option to true
-M- Set macro
-N- Set return DNS notify information
* never – Never return the info
* success – Return on successful delivery
* failure – Return on failure
* delay – Return on delayed delivery
-n – Supresses aliasing
-O
Monday, August 24, 2009
dim_STAT installation on Solaris 10
As the root user,
bash-3.00# tar xvf dim_STAT.tar
bash-3.00# cd dim_STAT-INSTALL/
bash-3.00# ls
ExpReport_15.tar.Z LICENSE-GPLv2.txt LICENSE.txt README.sol86 UNINSTALL.txt anySTAT soft
INSTALL.sh LICENSE-freeware.txt README STAT-service UserGuide conf x.install
bash-3.00# ./INSTALL.sh
===========================================
** Starting dim_STAT Server INSTALLATION **
===========================================
HOSTNAME: solten
IP: ::1
DOMAINE:
Is it correct? (y/n): n
** Hostname [solten]: solten
** IP addres [::1]: 192.168.2.222
** Domainname []: admincmd.blogspot.com
**
** ATTENTION!
**
** On your host You have to assign a USER/GROUP pair as owner
** of all dim_STAT modules (default: dim/dim)
User: dim
Group: dim
Is it correct? (y/n): y
**
** WARNING!!!
**
** User dim (group dim) is not created on your host...
** You may do it now by yourself or let me do it during
** installation...
**
May I create this USER/GROUP on your host? (y/n): y
======================================
** dim_STAT Directory Configuration **
======================================
** WebX root directory (5MB):
=> /WebX
=> /opt/WebX
=> /etc/WebX
[/opt/WebX]:
** HOME directory for dim_STAT pkgs [/apps]:
** TEMP directory [/tmp]:
** HTTP Server Port [80]: 999 ** DataBase Server Port [3306]: ** Default STAT-service Port [5000]: 1999
================================================== ** Process... ================================================== => Host : solten => IP address : 192.168.2.222 => Domain : admincmd.blogspot.com => User : dim => Group : dim => WebX root directory : /opt/WebX => HOME directory : /apps => TEMP directory : /tmp => HTTP Server Port : 999 => DataBase Server Port : 3306 => Default STAT-service Port : 1999
Is it correct? (y/n): y
** !!
** !! !!! WARNING !!!
** !! ---------------
** !!
** !! ALL DATA will be DELETED!!! in: /apps/* !!!
** !! as well /WebX, /etc/WebX, /opt/WebX !!!
** !!
Delete all data? (y/n): y
** Cleanup /apps
** Add User...
** WebX Setup...
** dim_STAT Server extract...
** HTTP Server Setup...
** Database Server Setup...
** ADMIN/Tools Setup...
** TEMP directory...
** Permissions...
** Crontab Setup...
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
**
** INSTALLATION is finished!!!
**
May I create now a dim_STAT-Server start/stop script in /etc/rc*.d? (y/n): y
============================================================================
NOTE:
=>
=> Please, set a password to the user dim
=> to enable clean up procedure via cron!..
=>
** =========================================================================
**
** You can start dim_STAT-Server now from /apps/ADMIN:
**
** # cd /apps/ADMIN
** # ./dim_STAT-Server start
**
** and access homepage via Web browser - http://solten:999
**
** To collect stats from any Solaris-SPARC/x86 or Linux-x86 machines
** just install & start on them [STAT-service] package...
**
** Enjoy! ;-)
**
** -Dimitri
** =========================================================================
bash-3.00# cd /apps/ADMIN/ bash-3.00# ./dim_STAT-Server start
================[ dim_STAT-Server: start ]================
*
* MySQL Database Server
*
=> Log output : /apps/mysql/data/mysqld.log.3306
=> Local socket: /apps/mysql/data/mysql.sock.3306
=> Admin Access: root# /apps/mysql/bin/mysql -S /apps/mysql/data/mysql.sock.3306
Starting...
Starting mysqld daemon with databases from /apps/mysql/data
Done.
Starting HTTP server from: /apps/httpd
Done.
================[ dim_STAT-Server: start -- done. ]================
TEST
1) via /apps/httpd/bin/htaccess create /apps/httpd/etc/.htpasswd file and add any pairs of user/password you need
2) create ".htaccess" file with context:
AuthName "Welcome to dim_STAT Host"
AuthType Basic
AuthUserFile /apps/httpd/etc/.htpasswd
require valid-user
3) copy ".htaccess" file into /apps/httpd/home/docs and /apps/httpd/home/cgi-bin
4) try to connect to your web server now and check the access user/password - that's all!
For example:
1) add user/password
bash-3.00# /apps/httpd/bin/htpasswd -c /apps/httpd/etc/.htpasswd dimuser
Adding password for dimuser.
New password:
Re-type new password:
2)create ".htaccess"
bash-3.00# vi .htaccess
Adding....
AuthName "Welcome to dim_STAT Host"
AuthType Basic
AuthUserFile /apps/httpd/etc/.htpasswd
require valid-user
bash-3.00# cat .htaccess
3) copy ".htaccess" to destination
bash-3.00# cp /tmp/.htaccess /apps/httpd/home/cgi-bin
bash-3.00# cp /tmp/.htaccess /apps/httpd/home/docs
bash-3.00# cd /apps/ADMIN
bash-3.00# ./dim_STAT-Server stop
bash-3.00# ./dim_STAT-Server start
4)Login again
Wednesday, August 19, 2009
Change default gateway in Sun Solaris 10
Default Gateway is maintained in the file /etc/defaultrouter
This file should contain an entry for each router directly connected to the network. The entry should be the name for the network interface that functions as a router between networks.
How to add or Edit
- If you wish to add or edit the default gateway ,edit /etc/defaultrouter file and update the IP Address.
- Use the command to manually configure the routes in the routing table.
# route delete default 192.1.1.1 <--remove the dexisting default gateway
# route add default 192.1.1.1 <--Add new default gateway
View the existing Kernel IP Routing table;
# netstat -nr
Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
——————– ——————– —– —– ———- ———
192.168.0.0 192.1.1.1 U 1 115 eth0
default 192.1.1.1 UG 1 25
127.0.0.1 127.0.0.1 UH 5 2 lo0
After changing default router restart network service;
#svcadm restart network/physical
For a detailed Man Page for /etc/defaultrouter click here
Friday, May 8, 2009
STARTUP/SHUTDOWN GLASSFISH ADMIN SERVER
The ‘asadmin’ utility is used to perform several administrative tasks on the Application Server. The server life cycle commands such as ‘start-domain’ is used to start the domain named domain-1 and ‘stop-domain’ is used to stop the Administration Server of the domain-1.
How to start?
#./asadmin start-domain domain1
#./asadmin start-node-agent
Starting Domain domain1, please wait.
Log redirected to ..........\domain1\logs\server.log.
Redirecting output to ..........\domains\domain1\logs\server.log
Domain domain1 started.
Domain [domain1] is running [Sun Java System Application Server 9.1_01 (build b09d-fcs)] with its configuration and logs at: [.......\domains].
Admin Console is available at [http://localhost:4848].
Use the same port [4848] for "asadmin" commands.
User web applications are available at these URLs:
[http://localhost:8080 https://localhost:8181 ].
Following web-contexts are available:
[/web1 /__wstx-services jpa-example ].
Standard JMX Clients (like JConsole) can connect to JMXServiceURL:
[service:jmx:rmi:///jndi/rmi://rajus01-755:8686/jmxrmi] for domain management purposes.
Domain listens on at least following ports for connections:
[8080 8181 4848 3700 3820 3920 8686 ].
Domain supports application server clusters and other standalone instances.
How to stop?
#cd /www/opt/SUNWappserver/bin
#./asadmin stop-node-agent
#./asadmin stop-domain domain1
Domain domain1 stopped.