Welcome to Nik Maslov`s blog

N900 andriod port - GSM calls available!

Permalink 08/27/10 09:08, by Nik Maslov, Categories: UNIX

Hi, morning started with a good news! N900 Android port, aka Nitdroid, is now able to make GSM calls! See this russian dude

making/receiving calls with his N900/Android :) That`s a very good news, we`ll take best from the both worlds!

1 comment »

Cannot start VMware server 2

Permalink 08/20/10 19:26, by Nik Maslov, Categories: UNIX , Tags: cannot start, linux, vmware

Recently I rebooted the server were we had VMware Server 2 instance - and afterwards VMware refused to start:


deb:~# /etc/init.d/vmware start
VMware Server is installed, but it has not been (correctly) configured
for the running kernel. To (re-)configure it, invoke the
following command: /srv/vmware/bin/vmware-config.pl.

But it was working and configured! Digged a little deeper, and I realised that this filthy software has put some token file, stating that it is non-configured for a variety of reasons:


deb:~# cd /etc/vmware
deb:/etc/vmware# ls -las
...
0 -rw-r--r-- 1 root root 0 2010-08-20 17:09 not_configured
...
deb:/etc/vmware# rm not_configured
rm: remove regular empty file `not_configured'? y

After that, all started to work!


deb:/etc/vmware# /etc/init.d/vmware start
Starting VMware services:
Virtual machine monitor done
Virtual machine communication interface done
Virtual ethernet done
Bridged networking on /dev/vmnet0 done
VMware Server Authentication Daemon (background) done
Shared Memory Available done
Starting VMware management services:
VMware Server Host Agent (background) done
VMware Virtual Infrastructure Web Access
Starting VMware autostart virtual machines:
Virtual machines done
deb:/etc/vmware# /etc/init.d/vmware status
Bridged networking on /dev/vmnet0 is running
Host network detection is not running
Module vmmon loaded
Module vmnet loaded

Weee! Hope that might help you as well sometime :)

3 comments »

Nokia N900 has arrived

Permalink 08/09/10 14:11, by Nik Maslov, Categories: UNIX , Tags: nokia n900 pros cons microusb software unix

Yes! After months of waiting, this uberwaffle-killer-beast red-eye unix geekish device is mine at last :)

Just started playing with it, although this tiny beast is capable of playing flac and a bunch of videoformats, I also decided to get 16Gb card and a decent AKG headphones.

This device rocks! It`s definately not for an blondie user, that got used to iPhone`ish apps and overall Apple ideology (which I can describe as an ugliest ever); it`s not for users that enjoying their all-and-everywhere Google services on their Android devices (such approach I found as "BigBrother is watching you" facist regime, but that`s mine paranoia, perhaps :) ). This baby is for users, that are found of getting new info, hack their devices, and people that are ready for getting in depths with their handheld devices. You could easily use n900 as it is, without messing around console, repositaries, rootfs and other stuff - but you won`t ever taste the power in this device. Nuff said, N900 is not for everyone, nor this is iPhone killer. It`s one-man-army on it`s own.

This post is not an comperhensive review of the device, it`s rather mine happy yell to the world. But I`ll outline some pros/cons I discovered so far:

Pros
- cool hardware; ARM Cortex A600, runs and 600Mhz; easly goes overclocked to 1Ghz; absolute record for now is whooping 1.7Ghz
- stunning OS - linux gives you ability to use ssh, ftp, any tools you might need for your everyday as an IT guy - python, bash, gcc, all linux command line bells and whistles are usable;
- enough nice apps - really, I found that there is enough nice apps for me in repos; some might say that`s not as a lot of as on iStore/aMarket, but that`s enough for me. I don`t need stupido apps like one for checking latest on the Britney Spears tour somewhere between rednecks in Minessota. once again - there is enough apps for serious work on the go!
- build quality; build like tank!
- nice display - resolution is quite good, and 4 desktops are fery nice
- DSP - this device plays music like an decent yet average mp3 player; this is not an superb Cowon player, but it plays more clearly (yet to bassy) than iPods, as ppl saying, and very-very good for an tablet/phone

Cons
- very average battery life - with some tweaks applied, like brightness to lowest and wifi turned off, using device like mp3 payer on my way to the office and as phone is giving me approx 2 days of usage; hey, Nokia, give us 2500mA battery!
- weak micro USB port - as officially annouced by Nokia, there are problems with micro USB port on N900, it could just fell off with the charger. It`s due to the weird and stupid decision to place USB port on the plate just with glue and some other weak stuff. There is an guaranty applied to such kind of the malfunctioning, but, hey, 600$ device should be free from such kind of mis-design. Anyway, there is some articles with the remedies to this - me, for example, had already tuned the charger by removing metal horns on the lower part, to make it more smooth and less harass the port itself - and guys on maemo.org already soldering their ports to be rock-solid; an hackers delight!

In a cople of days I`ll post a list of software, that I installed on the N900, that are very useful for me; perhaps you`ll find smth interesting there as well!

Cheers!

4 comments »

SegFault due to the libs missing

Permalink 08/03/10 20:58, by Nik Maslov, Categories: UNIX

Having patched the system with latest Sun patchcluster, I found that I cannot start any zones any more!



# zoneadm list -cv
ID NAME STATUS PATH BRAND IP
0 global running / native shared
Segmentation Fault

Debugging the dump gave no info, but I went yet down...



# ldd /usr/sbin/zoneadm
...
libz.so.1 => /usr/local/lib/libz.so.1
libz.so.1 (SUNW_1.1) => (version not found)
...

Aha! That`s the lib problem with the SUNWzlib package, that is used for the gzip. So, googling around and praising unix.com forum, I was able to find another instance of the library that was expected, but somehow was mis-placed by another version:



# grep libz.so.1 /var/sadm/install/contents | grep " f "
/usr/lib/libz.so.1 f none 0755 root bin 80200 28295 1170178503 SUNWzlib
/usr/lib/sparcv9/libz.so.1 f none 0755 root bin 98656 6323 1170178503 SUNWzlib
/usr/local/lib/libz.so.1.2.5 f none 0755 bin bin 87892 20672 1273268080 SMCzlib

Now, I`m preceding the LD_LIBRARY_PATH with the path to the first one lib:



export LD_LIBRARY_PATH=/usr/lib/:/usr/local/lib:/usr/openwin/lib:/usr/local/lib:/usr/openwin/lib

Fingers crossed...


# zoneadm list -cv
ID NAME STATUS PATH BRAND IP
0 global running / native shared
- chiscsmcst01svn installed /export/zones/chiscsmcst01svn native shared
- chiscsmcst01syslog installed /export/zones/chiscsmcst01syslog native shared
- chiscsmcst01audit installed /export/zones/chiscsmcst01audit native shared
- chiscsmcst01gc installed /export/zones/chiscsmcst01gc native shared

Works! But I have a strange feeling, that this might be related to the patchcluster...

7 comments »

Jet server is not patching server with latest patchcluster?...

Permalink 07/07/10 23:32, by Nik Maslov, Categories: UNIX

After the install of the Jet/JumpStart server, I also tried to install latest patchcluster alongside with the other infrastructure, to be able to patch servers after they have been installed. Never worked :) Now I know why: some time ago Sun had changed the format in which they are providing you the patchcluster.

In short, you have to do the following:


root@server# cd 10_Recommended/patches/
root@server# ls
root@server# mv * ../

i.e. you have to move all patches one level up. That will do the trick :)

Cheers

4 comments »

heredoc syntax and usage

Permalink 07/07/10 00:59, by Nik Maslov, Categories: UNIX

I`m in unix administration for quite some time, but I wasn`t aware of that trick. In short terms - it is a special-purpose code block. This stuff uses a some form of I/O redirection to feed a command list to an interactive program or a command, such as ftp, cat, etc. A limit string delineates (frames) the command list. The special symbol << designates the limit string. This has the effect of redirecting the output of a file into the stdin of the program or command.


# sort > file << EOF
heredoc> LJHLKIH
heredoc> aaa
heredoc> Zasdsadf
heredoc> zdsgfdf
heredoc> $PATH
heredoc> `uname -n`
heredoc> EOF
# cat file
/usr/bin:/usr/local/bin:/opt/Adobe/Reader9/bin/:/opt/DTT/Bin/:/opt/csw/bin/:/usr/local/bin:/opt/Adobe/Reader9/bin/:/opt/DTT/Bin/:/opt/csw/bin/
LJHLKIH
Zasdsadf
aaa
sol10node01
zdsgfdf

By default bash will interpolate the content of the block like it would in a double-quoted string. If you want to avoid this (for example if your here document contains a script you want to output verbatim) you can put single quotes around your limit string.


# export var="hello"
# cat <<LimitString
heredoc> echo $var
heredoc> LimitString
echo hello
# cat <<'LimitString'
heredoc> echo $var
heredoc> LimitString
echo $var

Sweet :)

5 comments »

Good old times of terminals

Permalink 06/19/10 01:02, by Nik Maslov, Categories: UNIX , Tags: term stty solaris terminal

Sometimes we all go back to the roots. In terms of UNIX - it means going back to the tips and tricks that was developed by guys, that did all that ls/rm/format stuff years before we ever saw UNIX/GNULinux systems...

One of such is tuning your terminal, reassigning the keys for different purposes (including that sometimes annoying DELETE key behaviour). Yet I don`t want to be an replacement for man command, few useful tricks are below:


stty {option} {default System-V keys}

stty erase (delete previous symbol) ^\? [DELETE]
stty kill (delete line) ^u [CTRL-u]
stty werase (delete previous word) ^w [CTRL-w]
stty intr (kill current task) ^c [CTRL-C]
stty quit (kill current task, create dump file) ^\\ [CTRL-\]
stty susp (stop current task, afterwards you can move it to backgound with bg command) ^z [CTRL-z]
stty rprnt (again show current line) ^r [CTRL-r]
stty -a (show all current terminal settings)
stty columns 120 (widen your terminal; useful when you have "Terminal too wide" message)

All terminals that can be used on a current system are listed in


/etc/termcap

You can check what terminal you are running in a true old-school way:


tput -T`echo $TERM` longname

Re-initialising of the terminal (using current $TERM) is done by:


tput init

Old is gold! Stay tuned,
Nik

8 comments »

Solaris 10 web interface

Permalink 06/16/10 23:03, by Nik Maslov, Categories: UNIX , Tags: solaris 10 smcwebserv web console zfs

As you might know, Solaris 10 comes with nice web-interface tool for ZFS administration, software management and other stuff. That`s the process, that kept me wondering of it`s origin - whenever you install Solaris 10, it appears from the beginning. Though it`s a handy tool for click`n`do style for ZFS administration, I prefer good old console. So, at the beginning, this server is listening only locally, on port 6789. To start things rolling, we need to make it listen worldwide:


# /usr/sbin/svccfg -s svc:/system/webconsole setprop options/tcp_listen = true

That will make it`s SVC config to be changed; to make things applied, do the following:


# /usr/sbin/svcadm refresh svc:/system/webconsole
# /usr/sbin/smcwebserver stop
# /usr/sbin/smcwebserver start
# /usr/sbin/svcadm enable svc:/system/webconsole

Now, make sure, that it`s really listening on the port:


# netstat -an | grep 6789
*.6789 *.* 0 0 49152 0 LISTEN

Works! Now navigate with your login/passwd to the https://`hostname`:6789

That should give you the feel of the Solaris 10 web-iface tool :) Enjoy!

And don`t forget to read Sun/Oracle documentation on it.

Cheers!

7 comments »

Administer SC from Solaris? Easy as pie!

Permalink 06/15/10 00:19, by Nik Maslov, Categories: UNIX , Tags: sc, serial console, solaris

Hi,
I`ve found an very nice tool to administer SC (serial console) from within the Solaris itself. No need in Raritan, and friends to access SC.

And the name is:

# /usr/platform/`uname -i`/bin/scadm

Just to know the console history use this:

# /usr/platform/`uname -i`/bin/scadm consolehistory
/usr/platform/SUNW,Sun-Fire-V440/sbin/scadm loghistory
May 20 09:26:13 : 00070002: "Indicator PS0.POK is now ON"
May 20 09:26:13 : 00070002: "PSU @ PS0 is OK."
May 20 09:26:12 : 00070002: "Indicator PS0.STBY is now ON"
May 20 09:26:07 : 00070002: "Indicator PS0.STBY is now OFF"
May 20 09:26:07 : 00070002: "Indicator PS0.POK is now OFF"
May 20 09:26:07 : 00070002: "Input power unavailable for PSU @ PS0."
May 20 09:25:05 : 00070002: "PSU @ PS0 is OK."
May 20 09:25:03 : 00070002: "Indicator PS0.POK is now ON"
May 20 09:25:03 : 00070002: "FAULT_SENSOR @ PS0.FF_POK has faulted. May be caused by MB POK circuitry malfunctio"
May 20 09:25:02 : 00070002: "Indicator PS0.STBY is now ON"
May 20 09:20:43 : 00070002: "Input power unavailable for PSU @ PS0."
May 20 09:20:41 : 00070002: "PSU @ PS0 has been inserted."
May 20 09:20:33 : 00070002: "Required PSU @ PS0 is not present."
May 20 09:20:32 : 00070002: "PSU @ PS0 has been removed."
May 19 11:10:49 : 00070002: "Input power unavailable for PSU @ PS0."

See? Sweet, isnt` it!

And help is avail just by doing:

# /usr/platform/SUNW,Sun-Fire-V440/sbin/scadm help

6 comments »

Fork resource temporarily unavailable

Permalink 05/21/10 23:14, by Nik Maslov, Categories: UNIX , Tags: fork, processes, unix

One of our services was having unknown issues - it just stopped spawning new processes...Logged in via console, I wasn`t been able to run commands as well - no new processes could be started. Crawling around internet dark corners (unix.com, Mr. Perdorabo - kudos!), I`ve found few hacks to execute commands in such state:

ls

$ myls() { while [ $# -ne 0 ] ; do echo "$1" ; shift ; done ; }
$ myls /etc/s*
/etc/services
/etc/shells
/etc/syslog.conf


cat

$ mycat() { while IFS="" read l ; do echo "$l" ; done < $1 ; }
$ mycat /etc/shells
# # This is a list of valid login shells (single rooted).
# Ftpd must see one of these shells as a user's login shell to connect.
#
/bin/sh
/bin/ksh
/bin/csh
/bin/tcsh
/usr/local/bin/bash
$


Often you can do also this neat trick, as sometimes it will allow you to use exec:

# exec df -h

7 comments »

Kill detached screen sessions

Permalink 05/19/10 20:59, by Nik Maslov, Categories: UNIX

Absolutely stupid task - but I`ve spent 20 mins figuring that one out :)

So, I had:

-bash-3.00$ screen -ls
There are screens on:
1577.pts-1.sol10node01 (Detached)
1647.pts-1.sol10node01 (Detached)
2 Sockets in /tmp/uscreens/S-maslovn.

To kill those pesky screens, I do:


-bash-3.00$ screen -X -S 1577.pts-1.sol10node01 quit
-bash-3.00$ screen -ls
There is a screen on:
1647.pts-1.sol10node01 (Detached)
1 Socket in /tmp/uscreens/S-maslovn.

That`s it :)

6 comments »

Solaris 10 - cannot get disk geometry error

Permalink 04/26/10 08:53, by Nik Maslov, Categories: UNIX

Recently swapping out old and pulling in new hdd, I stumbled upon this error:


# prtvtoc /dev/rdsk/c0t2d0s2 | fmthard -s - /dev/rdsk/c0t3d0s2
Cannot get disk geometry.

Seems like old disk geometry is still in place interfering with new. So I just issued an


# format
..selected new disk, then -> type -> 0 for auto detection

That helped format the disk without any issues.

Cheers,
Nik

5 comments »

Solaris 10 static route

Permalink 04/22/10 18:12, by Nik Maslov, Categories: UNIX , Tags: solaris 10 static route

Pretty basic stuff, but you`ll never know when you`ll forget this :)

Add static route:

# route add default 10.230.1.1

This will add this server as default gateway, but it will dissapear after the restart. To make it reboot persistent, just make this:

# route -p add default 10.230.1.1
# cat /etc/inet/static_routes
# File generated by route(1M) - do not edit.
default 10.230.1.1

As you see, static_route file has changed, to reflect such reboot-persistent route.

7 comments »

Solaris one-liners

Permalink 03/24/10 12:00, by Nik Maslov, Categories: UNIX , Tags: bash, oneliner, solaris

Awesome solaris/unix one liners, will definitely save a lot of time for any sysadmin. Take a look at them here.

6 comments »

Install packages into zone with alternative basedir

Permalink 03/11/10 00:05, by Nik Maslov, Categories: UNIX , Tags: solaris zone pkgadd basedir

Recently I was on the task to install package into the zone. Those packages were from SFW, and where using /usr, which I inherited from global zone. To get past this, decision was made to install the package into another dir, which is called basedir. Lets make it more clear with examples:

We have an package:


# ls
db-4.2.52.NC-sol10-sparc-local

Try to install it:


# pkgadd -d db-4.2.52.NC-sol10-sparc-local

The following packages are available:
1 SMCdb db
(sparc) 4.2.52.NC

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]: all

Processing package instance SMCdb from

db(sparc) 4.2.52.NC
Sleepycat Software

The selected base directory must exist before
installation is attempted.

Do you want this directory created now [y,n,?,q] y
pkgadd: ERROR: unable to make directory .

Installation of SMCdb failed (internal error).

By default, pkgadd command reads “/var/sadm/install/admin/default”, which specifies the base directory in which to install software. Let`s create alternative one for our needs!


# echo "basedir=/apps/$PKGINST" > /var/sadm/install/admin/custom

and use it with pkgadd command to get this package installed into new directory:


# pkgadd -a custom -d db-4.2.52.NC-sol10-sparc-local
...
/apps/SMCdb/BerkeleyDB.4.2/docs/utility/db_verify.html
/apps/SMCdb/BerkeleyDB.4.2/docs/utility/index.html
/apps/SMCdb/BerkeleyDB.4.2/include/db.h
/apps/SMCdb/BerkeleyDB.4.2/include/db_185.h
/apps/SMCdb/BerkeleyDB.4.2/include/db_cxx.h
/apps/SMCdb/BerkeleyDB.4.2/lib/libdb-4.2.a
/apps/SMCdb/BerkeleyDB.4.2/lib/libdb-4.2.la
/apps/SMCdb/BerkeleyDB.4.2/lib/libdb-4.2.so
/apps/SMCdb/BerkeleyDB.4.2/lib/libdb-4.so
/apps/SMCdb/BerkeleyDB.4.2/lib/libdb.a
/apps/SMCdb/BerkeleyDB.4.2/lib/libdb.so
verifying class none

Installation of SMCdb was successful.

Thats it! No we just need to tweak the $PATH to make it easily accessible.

9 comments »

OK prompt and link on server NIC

Permalink 03/04/10 15:29, by Nik Maslov, Categories: UNIX , Tags: alom mac uplink solaris

I have received an Sun Fire 440 server to install, though only info I had for it was the ALOM password. To JumpStart/JET this server, I need to know what NIC`s have the link attached to them, and their corresponding MAC addresses. A little bit of black magic and googling - and that`s the way to get the NIC list on the server, theirs link status and MAC addresses.

Let`s go:

- get the list of the NICs at the server:


{1} ok show-nets
a) /pci@1d,700000/network@2,1
b) /pci@1d,700000/network@2
c) /pci@1d,700000/pci@1/network@3
d) /pci@1d,700000/pci@1/network@2
e) /pci@1d,700000/pci@1/network@1
f) /pci@1d,700000/pci@1/network@0
g) /pci@1f,700000/network@2,1
h) /pci@1f,700000/network@2
q) NO SELECTION
Enter Selection, q to quit: c

- get the MAC address of the selected NIC:


{1} ok show-nets
a) /pci@1d,700000/network@2,1
b) /pci@1d,700000/network@2
c) /pci@1d,700000/pci@1/network@3
d) /pci@1d,700000/pci@1/network@2
e) /pci@1d,700000/pci@1/network@1
f) /pci@1d,700000/pci@1/network@0
g) /pci@1f,700000/network@2,1
h) /pci@1f,700000/network@2
q) NO SELECTION
Enter Selection, q to quit: f
/pci@1d,700000/pci@1/network@0 has been selected.
Type ^Y ( Control-Y ) to insert it in the command line.
e.g. ok nvalias mydev ^Y
for creating devalias mydev for /pci@1d,700000/pci@1/network@0
{1} ok cd /pci@1d,700000/pci@1/network@0
{1} ok .properties
...

network-interface-type ethernet
device_type network
name network
local-mac-address 00 03 ba db 80 1b

...

- get the link status of the selected NIC:


{1} ok apply watch-net /pci@1d,700000/pci@1/network@2
/pci@1d,700000/pci@1/network@2: link down
{1} ok apply watch-net /pci@1d,700000/pci@1/network@1
/pci@1d,700000/pci@1/network@1: link down
{1} ok apply watch-net /pci@1d,700000/pci@1/network@0
/pci@1d,700000/pci@1/network@0: 1000 Mbps full duplex link up
Watch ethernet packets
'.' is a good packet and 'X' is a bad packet
Press any key to stop

Aha! Seems like network@0 is the NIC to boot from. Booting from a specific NIC is very easy:


{1} ok boot /pci@1d,700000/pci@1/network@0 -v

-v is for verbose.

That`s it, this info is enough to get info needed to jumpstart server :D

Take care!

31 comments »

SSH no kex alg

Permalink 02/27/10 00:49, by Nik Maslov, Categories: UNIX , Tags: ssh no kex alg solaris

Having recently JumpStarted an new server, I found it unable to login via ssh


root@chiscadm01~# ssh 10.23.3.103
no kex alg

Solution was to regenerate the SSH keys on that server


# /lib/svc/method/sshd -c
# svcadm refresh ssh

and voila! It works as it should.

Cheers!

6 comments »

Shell useful tricks (basic stuff)

Permalink 02/26/10 19:20, by Nik Maslov, Categories: Background, UNIX , Tags: bash tricks unix

Nice tricks with shell, I discovered in internet darkest corners :)

Credits & kudos goes to:

Prentice Bisbal

Brace expansion takes a list of strings separated by commas and expands those strings into separate arguments for you. The list should be enclosed by braces.


# echo {1,2,3,4,5}
1 2 3 4 5

# cp .zshrc{,_backup}
# ls | grep .zsh
.zshrc
.zshrc_backup

Command substitution - enclose any command that generates output to standard output inside parentheses and precede the opening parenthesis with a dollar sign, $(command).


echo $(aptitude search mc | grep cube)
p wmcube - spinning 3D object that shows the current

new syntax
echo `aptitude search mc | grep cube`
p wmcube - spinning 3D object that shows the current

Error redirect will redirect all errors to the /dev/null, or file of yourchoise (this is based on the file descriptors, google around if you interested).


# find / -name hzchetakoe 2> /dev/null

Route error output to normal output.

# find / -name hzchetakoe > output.txt 2>&1

Bash loops work like this:


for i in `cat hosts.txt` ; do ssh $i "uname -a" ; done

5 comments »

Shell snooping with DTrace

Permalink 02/24/10 20:15, by Nik Maslov, Categories: UNIX

Lurking around the inet, getting info about Solaris Audit - I stumbled upon this wonderful DTrace script. What it basically do - is to snoop all activity around shells, such as keystrokes and command outputs. Very handy indeed, smth like BSA for cheap :)

Grab the script here.

Kudos goes to the author!

5 comments »

vSphere 4 implementation videos

Permalink 02/05/10 12:04, by Nik Maslov, Categories: UNIX

Lurking around internet, I found this wonderful free videos about VMWare ESX 4. Nicely shown, thanks!

Link to the videos

5 comments »

Attach disk to the ZFS root mirror pool

Permalink 01/28/10 19:40, by Nik Maslov, Categories: UNIX

Having broke root mirror pool, trying to migrate it to RAID-Z to boot from (until I figured out, that booting from RAID-Z is not yet supported in Solaris, but works in Free-BSD - WTF!!?!?), I was forced to put disk back into root mirror pool...but failed. That`s what have I done to fix this:



-bash-3.00# zpool attach rpool c0t0d0 c0t1d0
cannot label 'c0t1d0': EFI labeled devices are not supported on root pools.



-bash-3.00# prtvtoc /dev/rdsk/c0t0d0s0 | fmthard -s - /dev/rdsk/c0t1d0s0
fmthard:  New volume table of contents now in place.
-bash-3.00# zpool attach rpool c0t0d0s0 c0t1d0s0
Please be sure to invoke installboot(1M) to make 'c0t1d0s0' bootable.

-bash-3.00# installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/rdsk/c0t1d0s0
-bash-3.00# zpool status
pool: rpool
state: ONLINE
scrub: resilver completed after 0h5m with 0 errors on Thu Jan 28 17:22:02 2010
config:
NAME          STATE     READ WRITE CKSUM
rpool         ONLINE       0     0     0
mirror      ONLINE       0     0     0
c0t0d0s0  ONLINE       0     0     0
c0t1d0s0  ONLINE       0     0     0  6.00G resilvered
errors: No known data errors

That`s it! Works, up and running.

PS - sun.com is gone...being an rational man I do believe, that Oracle will get most of Sun`s great engineers with Oracle`s sales managers (`cos Sun`s sales are the worst ever, and Johnny Schwartz should be banned from IT forever), and I wish that Solaris/Oracle will make an great deal. Godspeed!

 

34 comments »

Solaris Infrequently Asked and Obscure Questions

Permalink 01/14/10 19:19, by Nik Maslov, Categories: UNIX , Tags: asked, infrequently, obscure, questions, solaris

Perfect information for unix admin to read through, absolutely worth reading! Get it here.

 

 

6 comments »

Nokia 5530 issues with Media Library

Permalink 01/01/10 22:23, by Nik Maslov, Categories: Background , Tags: nokia 5530 deleted music

Post completely unrelated to Solaris :>>

 

I do have this baby - and it rock! Nice OS, 200$, mp3 playback at the mid-range PMP device level and nice design is giving me faith to Nokia.

5530

 

 

But today I had first issues with music library - I grabbed some album from inet, unpacked it - but it was flacky, so I removed it physically from Memory card - but it didn`t dropped down from Player, not allowing me to get rid from it, nor delete it from within the Player. Googling a little, I figured the way to make your Nokia (5530 in particular) to forcefully totally refresh the musical library. This instructions helped me - they could help you:

 

Manually remove deleted artists from Music Library
1. Connect your 5800 to you PC in Mass Storage Mode

2. On your PC you will need to have allowed to "Show" hidden files, do this from Explorer/Tools/ Folder Options/ View and select "Show hidden files and Folder"

3. Open your SD memory card/Removable Disk in My Computer on PC

4. Go to E:\ Private there you will see 3 folders 101f8857, 101ffca9 and 10281e17 . Shown below left.

5. Go to Private\101f8857\Cache\E there you will see .dat files. Delete all the .dat file BUT NOT the E Folder. 

6. Now go to Private\101ffca9 there you will see another .dat file, Delete the dat file NOT the folder. Shown below Left.

7. Finally go to Private\10281e17 There you should see 4 files 2 are Mp3 files other are Podcast files. Delete mpxv2_2.db & mpxv2_2.db-journal for Mp3 files list and Delete pcv6_1.db & pcv6_1.db-journal for Podcast files list. Shown above right

8. Close all windows and disconnect your Phone. Go to Music Library and it should automatically start a refresh.


54 comments »

When user has last changed his password in Solaris

Permalink 12/24/09 19:03, by Nik Maslov, Categories: UNIX , Tags: password, perl, shadow, solaris

Title says it all.  Since, the date of last change of password is in /etc/shadow:

 

root:x:14602::::::

That means, that root has last changed his password 14602 days after beginning of unix epoch, i.e. 1 Jan 1970.

But we need to convert this into normal date, and almost all converters think, that this number is in seconds, not days. To do this, this perl script will be handy (thanks to someone, I found this on inet):

 

#!/usr/bin/perl

# Output date format is YYYY-MM-DD

open( S, "/etc/shadow" );

while( <S> )

{

($user,$lastchg) = (split /:/)[0,2];

@t = localtime( $lastchg*86400 );

printf "User %-8s last changed password %0.4d-%0.2d-%0.2d (%5d)\n",

$user, $t[5]+1900, $t[4]+1, $t[3], $lastchg;

}

close( S );

exit 0;

 

Handy instrument indeed!

3 comments »

Zones related commands

Permalink 12/16/09 23:31, by Nik Maslov, Categories: UNIX , Tags: commands, solaris, zones

Digging through internet while deep-diving into Solaris zones, I have found few interesting commands, that related to the zones. Worth checking out:

zonename - prints the name of the current zone

ifconfig e1000g0:1 -zone zone01 - get the IP for this Virtual NIC back to the global zone from the local zone01

ifconfig e1000g0:1 zone zone01 - vice versa, i.e. get the IP from the global zone, attached to this VNIC to the local zone01

ifconfig -Z - executes command for all interfaces in the users zone

ipcrm -z <zonename> - deletes a message queue, a semaphore set or a shared memory ID of a zone

patchadd/pkgadd -G - install patch/package only in global zone

pkill -z <zoneID> - pkill applied to that zone

poolbind -i zoneid <zonename> - attach all processes in that zone to the pool

prctl -i zoneid <zonename> - Displaying and modification of resource controls of zone processes

priocntl -i zoneid <zonename> - Displaying and changing the scheduling parameters in a zone.

rctladm - Displaying and modification of global settings for resource controls

renice -i zoneid <zonename> - modifies the priority of the processes inside the zone

df -hZ - display zone mounts

ipcs -z - displays interprocess communication parameters of a zone

pgrep -z <zoneid> - grep through processes inside the zone

prstat -z <zonename> - show info re processes in particular zone

prstat -Z - show info re global zone AND local zones in the bottom

ps -z <zonename> -  show info re processes in particular zone

ps -Z - display the zone process belongs to



61 comments »

:: Next >>

Search

XML Feeds

StatCounter

powered by b2evolution

©2010 by Nik Maslov

Contact | b2evo skin by Asevo | PHP framework | VPS | François