Skip to main content

Difference between Linux and Solaris commands

ps


ps -ef on Linux will give the full command line, but with Solaris you don’t get it all.
This is particularly critical when looking at java processes.
Fortunately Solaris retains the BSD style binaries in /usr/ucb, so execute:
 /usr/ucb/ps wwaux|grep java
instead

bash



/bin/sh on Solaris is a POSIX complaint bourne shell. If you have written bash-centric scripts, replace #!/bin/sh with #!/bin/bash

NFS


Starting of NFS daemon

Instead of
# service nfsserver start
one does:
# svcadm enable network/nfs/server

Exports



Instead of the file /etc/exports, under Solaris the file /etc/dfs/dfstab needs to be edited.

Sharing with zfs

Nowadays, you would probably use zfs sharenfs eg:
# zfs set sharenfs=on zpool/sharedfolder

# zfs sharenfs=rw=server.fqdn.ch,rw=otherserver.fqdn.ch zpool/sharedfolder

An attempt at a matrix

Linux commandSolaris similar commandComments
topprstatYou can compile top on Solaris, but you can’t rely on it’s accuracy
freevmstat
cat /proc/meminfoprtconf | grep Memory
cat /proc/cpuinfopsrinfo -vyou can also use prtconf
netstat -plsof -ilsof is not a default command. You need the package
uname -aisainfo -bto determine how many bits your os is
java -d64java -d64Start java with a default of 64 bit. Linux seems to do this by default though.
cat /etc/redhat-releasecat /etc/release
sysdefsysdef holds a lot of system info including kernel tunables
lsmodmodinfo
stracetruss

Another matrix

RHELSolaris
Shutdown
shutdown -h now (or) poweroffshutdown -y -g0 -i5 (or) init 5
rebootreboot (or) shutdown -y -g0 -i6 (or) init 6
halthalt
Kernel
/sbin/lsmodmodinfo
/sbin/insmodmodload
/sbin/rmmodmodunload
scanpci/usr/X11/bin/scanpci (or) prtconf -v
Printing
lp (or) lprlp (or /usr/ucb/lpr)
lpstat (or) lpqlpstat (or /usr/ucb/lpq)
Services
/sbin/service –status-allsvcs -a
/sbin/service sendmail stopsvcadm disable sendmail
/sbin/service sendmail startsvcadm enable sendmail
/sbin/service sendmail statussvcs sendmail
/sbin/chkconfig –listsvcs -a
/sbin/chkconfig –add /etc/rc3.d/f00svccfg import f00.xml
/sbin/chkconfig sendmail onsvcadm enable sendmail
Monitoring
topprstat
cat /proc/cpuinfopsrinfo -v
cat /proc/meminfoprtconf
NFS
exportfsexportfs (or) share
(edit /etc/exports)share /home (or) zfs sharenfs=on
(edit /etc/exports) unshare /home (or) zfs sharenfs=off
Networking
/sbin/mii-toolndd (or) /sbin/dladm show-dev
ifconfigifconfig -a
/sbin/ethtoolndd
/sbin/dhclientdhcpagent
iptablesipfilter
Storage
fdiskfdisk (and) format
partedformat
mkfs -t ext3 /dev/hda1mkfs -F ufs /dev/rdsk/c0t0d0s0 (or) newfs /dev/rdsk/c0t0d0s0
cdrecord dev=2,0 f00.iso cdrw -i f00.iso
tar xfvj f00.tar.bz2gtar xfvj f00.tar.bz2
lvm/pv*/lv*/vg*meta*
Dev
(edit /etc/ld.so.conf)crle
gcc/opt/csw/bin/gcc
ld/usr/ccs/bin/ld

Comments

Popular posts from this blog

memory error detect XSCF uboot

If you see something like this when you poweron you server: memory error detect 80000008, address 000002d0 data 55555555 -> fbefaaaa capture_data hi fbefaaaa lo deadbeef ecc 1b1b capture_attributes 01113001 address 000002d0 memory error detect 80000008, address 000002d4 data aaaaaaaa -> deadbeef capture_data hi fbefaaaa lo deadbeef ecc 1b1b capture_attributes 01113001 address 000002d4 memXSCF uboot  01070000  (Feb  8 2008 - 11:12:19) XSCF uboot  01070000  (Feb  8 2008 - 11:12:19) SCF board boot factor = 7180     DDR Real size: 256 MB     DDR: 224 MB Than your XSCF card is broked. Replace it with new one. After that it will ask you for enter chassis number - located at front of the server XSCF promt to enter your chasses number ( is a S/N of your server ): Please input the chassis serial number : XXXXXXX 1:PANEL Please select the number : 1 Restoring data from PANEL to XSCF#0. Please wait for se...

Solaris. remove unusable scsi lun

Solaris remove unusable or failing scsi lun 1. The removed devices show up as drive not available in the output of the format command: # format Searching for disks...done ................      255. c1t50000974082CCD5Cd249 <drive not available>           /pci@3,700000/SUNW,qlc@0/fp@0,0/ssd@w50000974082ccd5c,f9 ................      529. c3t50000974082CCD58d249 <drive not available>           /pci@7,700000/SUNW,qlc@0/fp@0,0/ssd@w50000974082ccd58,f9 2. After the LUNs are unmapped Solaris displays the devices as either unusable or failing. # cfgadm -al -o show_SCSI_LUN | grep -i unusable # # cfgadm -al -o show_SCSI_LUN | grep -i failing c1::50000974082ccd5c,249       disk         connected    configured   failing c3::50000974082ccd58,249 ...

FOS Password recovery (Brocade Fabric OS Switch Password recovery procedure)

Password recovery using root account If you have access to the root account, you can reset the passwords on the switch to default. This feature is available for all currently supported versions of the Fabric OS. Follow the below steps to reset any account password from the root account. 1. Open a CLI session (serial or telnet for an unsecured system and sectelnet for a secure system) to the switch. 2. Log in as root. 3. At the prompt, enter the passwddefault command as shown below: switch:root> passwddefault 4. Follow the prompts to reset the password for the selected account. For example: switch:root> passwddefault All account passwords have been successfully set to factory default. Once the passwords have been reset, log into the switch as admin, and modify your default passwords. Make sure to keep a hardcopy of your switch passwords in a secure location. The default passwords for Fabric OS switches are: Root fibranne Adminpassword Userpassword Password r...