smartctl -a /dev/ada0
Monthly Archives: June 2015
freebsd check disks
camcontrol devlist
solaris 11 dns resolve not working
svcadm refresh name-service/switch
cat /etc/nsswitch.conf
hosts: files dns
ipnodes: files dns
nscfg import -f name-service/switch:default
nscfg import -f dns/client:default
ping su.lt
su.lt is alive
solaris static ip address
netadm enable -p ncp DefaultFixed
ipadm create-ip net0
ipadm create-addr -T static -a 10.0.11.10/24 net0
solaris enable ssh for root
nano /etc/default/login
and comment line:
CONSOLE=/dev/console
nano /etc/ssh/sshd_config
PermitRootLogin yes
svcadm restart network/ssh
xfce vnc no icons images
sudo apt-get install xubuntu-icon-theme
mysql check config
Simple type: mysqld –help
nfo [cpses_tool] MYSQL: Remove dbuser cpses blank screen
1) I ran a grep for the sessions that were currently in effect:
# grep “cpses_” /var/cpanel/databases/
2) I removed the following sections from any user’s yaml that matched the
cpses_########”:
dbs: {}
server: X.X.X.X
3) I removed each of the cpses_######## lines from /var/cpanel/databases/users.db
4) I ran the following command to update the user-data:
# /scripts/update_db_cache
5) I then removed all of the cpses_######## users from the mysql.user table to remove the users from mysql. This can be accomplished from the command line or from WHM>> PhpMyAdmin
virtualbox repo
sudo wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo -P /etc/yum.repos.d/
[virtualbox]
name=Fedora $releasever – $basearch – VirtualBox
baseurl=http://download.virtualbox.org/virtualbox/rpm/fedora/$releasever/$basearch
enabled=1
gpgcheck=1
gpgkey=https://www.virtualbox.org/download/oracle_vbox.asc
Unable to contact valid package repository Encountered the following error(s)
pkg refresh
pkg: 0/1 catalogs successfully updated:
Unable to contact valid package repository
Encountered the following error(s):
Unable to contact any configured publishers.
This is likely a network configuration problem.
1: Invalid contentpath dictionary update sequence element #1 has length 1; 2 is required: Unable to parse repository’s versions/0 response.
2: Invalid contentpath dictionary update sequence element #1 has length 1; 2 is required: Unable to parse repository’s versions/0 response.
3: Invalid contentpath dictionary update sequence element #1 has length 1; 2 is required: Unable to parse repository’s versions/0 response.
4: Invalid contentpath dictionary update sequence element #1 has length 1; 2 is required: Unable to parse repository’s versions/0 response.
You should check your default gateway, like this: netstat -nr, gateway should be reachable.
solaris ips
Image Packaging System (IPS)
pkg Packaging client
pkgrepo Repository management utility
pkgrecv Content retrieval utility
pkgsend Package creation and publication
pkgdiff Package manifest comparing utility
pkgmerge Package merging utility
pkgmogrify Package manifest transmogrifying utility
pkgfmt Package manifest formatting utility
pkgsign Package signing utility
pkglint Package linting utility
ipf vs iptables
iptables -nvL vs ipfstat -io
solaris create free like program
vim /usr/bin/free
#!/usr/bin/ksh
# Available memory
memory=`prtconf | grep Memory | head -1 | awk 'BEGIN {FS=" "} {print $3}'`
gb_memory=`echo "scale=2; $memory/1024" | bc -l`
# Free memory
pagesize=`pagesize`
kb_pagesize=`echo "scale=2; $pagesize/1024" | bc -l`
sar_freemem=`sar -r 1 1 | tail -1 | awk 'BEGIN {FS=" "} {print $2}'`
gb_freemem=`echo "scale=2; $kb_pagesize*$sar_freemem/1024/1024" | bc -l`
# Used Memory
gb_usedmem=`echo "scale=2; $gb_memory-$gb_freemem" | bc -l`
# Conclusion
echo "Avai Mem: $gb_memory GB"
echo "Free Mem: $gb_freemem GB"
echo "Used Mem: $gb_usedmem GB"
~
solaris free like
echo ::memstat | mdb -k
Page Summary Pages Bytes %Tot
----------------- ---------------- ---------------- ----
Kernel 86154 336.5M 22%
Guest 0 0 0%
ZFS Metadata 18383 71.8M 5%
ZFS File Data 121791 475.7M 31%
Anon 41885 163.6M 11%
Exec and libs 1225 4.7M 0%
Page cache 5807 22.6M 1%
Free (cachelist) 4619 18.0M 1%
Free (freelist) 113239 442.3M 29%
Total 393103 1.4G
solaris: top vs prstat
prstat -Z:
PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP
2700 root 11M 3376K cpu0 59 0 0:00:00 0.1% prstat/1
2696 root 53M 43M stop 59 0 0:00:00 0.0% mdb/1
854 root 19M 4128K run 59 0 0:00:02 0.0% sshd/1
2531 root 13M 2840K sleep 59 0 0:00:00 0.0% nscd/36
855 root 10M 2344K run 49 0 0:00:00 0.0% bash/1
580 root 4132K 1976K sleep 59 0 0:00:00 0.0% hald-addon-acpi/1
543 daemon 3432K 1220K sleep 59 0 0:00:00 0.0% rpcbind/1
541 root 4180K 2032K sleep 59 0 0:00:00 0.0% hald-runner/1
289 netadm 12M 3904K sleep 59 0 0:00:00 0.0% nwamd/8
141 root 9892K 1324K sleep 59 0 0:00:00 0.0% syseventd/17
471 root 8828K 668K sleep 59 0 0:00:00 0.0% iscsid/2
298 root 3360K 1280K sleep 59 0 0:00:00 0.0% vbiosd/3
336 root 10M 2468K sleep 59 0 0:00:00 0.0% picld/40
308 root 2652K 1144K sleep 59 0 0:00:00 0.0% pfexecd/3
303 root 9520K 1104K sleep 59 0 0:00:00 0.0% dhcpagent/1
177 root 14M 5096K sleep 59 0 0:00:00 0.0% devfsadm/7
71 daemon 17M 5492K sleep 59 0 0:00:00 0.0% kcfd/3
67 netadm 4504K 2552K sleep 59 0 0:00:00 0.0% ipmgmtd/5
152 root 15M 2844K sleep 59 0 0:00:00 0.0% rad/4
588 root 4136K 2308K sleep 59 0 0:00:00 0.0% in.ndpd/1
116 daemon 2368K 672K sleep 59 0 0:00:00 0.0% utmpd/1
86 root 9764K 888K sleep 59 0 0:00:00 0.0% in.mpathd/1
49 root 4168K 2200K sleep 59 0 0:00:00 0.0% dlmgmtd/5
293 root 3584K 1380K sleep 59 0 0:00:00 0.0% dbus-daemon/1
39 netcfg 3696K 2360K sleep 59 0 0:00:00 0.0% netcfgd/4
305 root 2732K 1064K sleep 60 -20 0:00:00 0.0% zonestatd/5
15 root 21M 19M sleep 59 0 0:00:32 0.0% svc.configd/24
13 root 24M 16M sleep 59 0 0:00:06 0.0% svc.startd/12
500 root 8904K 832K sleep 59 0 0:00:00 0.0% cron/1
9 root 0K 0K sleep 99 -20 0:00:00 0.0% postwaittq/1
ZONEID NPROC SWAP RSS MEMORY TIME CPU ZONE
0 63 207M 157M 10% 0:00:46 0.1% global
Total: 63 processes, 435 lwps, load averages: 0.02, 0.03, 0.06