Lofland bLOG

Move network cable to another port on Solaris

Filed under Unix Notes on Monday, October 30th, 2006 @ 12:12pm by Christen

Port CE0 on the quad card (NIC) appears to be bad.

Even though the lights were all showing good link status on the card, the box was unpingable. When I put in the ticket with SUN on the NIC, the SUN tech was actually on site. He suggested moving the cable to another port on the same card. After he did this and I plumbed the port and assigned an address to it, connectivity was restored.

So the box is working now, but port CE0 is bad.

Here is how it looks now:

root@hostname: ifconfig -a
lo0: flags=1000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
ce0: flags=11000802 mtu 1500 index 2
inet 192.168.1.78 netmask ffffff00 broadcast 192.168.1.255
groupname nicgroup
ether …
ce2: flags=1000843 mtu 1500 index 3
inet 192.168.1.78 netmask ffffff00 broadcast 192.168.1.255
ether …

Please be aware that when the NIC is replaced, the network cable needs to be moved back to port CE0.

Also please be aware that if the box is rebooted before the NIC is replaced it will revert to using CE0. You will need to manually bring up CE2 again. There is no reason that I am aware of for the box to be rebooted before the NIC is replaced.

Here are the commands I used to bring up the IP on CE2:

ifconfig ce2 plumb
ifconfig ce2 192.168.1.78
ifconfig ce2 netmask 255.255.255.0 broadcast 192.168.1.255
ifconfig ce2 up
ifconfig ce0 down

Replace Text in Files with Perl

Filed under Unix Notes on Monday, October 30th, 2006 @ 11:58am by Christen

I didn’t write this, just posting it here for my reference:

Subject: UNIX Trick

Here’s a really quick way to edit a bunch of files in a search and replace manner. For example, I had 80 files for sending test transactions and had to change the IP Addr when I copied them to each server. I could have manually edited each one, but by using the following, I was able to change it in all 80 in a matter of about 10 seconds. It’s done using “perl” from the command line and is similar to using global replaces within “vi” if you’ve ever used that.

perl -pi -e ’s/wordToFind/replaceWithThisWord/’ *.fileExtension
perl -pi -e ’s/wordToFind/replaceWithThisWord/g’*.fileExtension
perl -pi -e ’s/wordToFind/replaceWithThisWord/gi’*.fileExtension

Remember to escape any special characters like “*”, “.”, etc by putting a “\” in front. Here’s the command I used this morning that shows what I mean:

perl -pi -e ’s/192\.168\.1\.75/10\.0\.0\.79/g’ *

The above command replaces 192.168.1.75 with 10.0.0.79 in all the files in the directory I was working in. I put the “\” in front of the “.” to instruct perl to ignore the special meaning of the “.”

Useful Links for Unix Admins

Filed under Unix Notes on Monday, October 30th, 2006 @ 10:39am by Christen

Network Calculators:
http://www.subnetmask.info/

Miscilaneous Solaris Notes:
http://www.brandonhutchinson.com/Miscellaneous_Solaris_notes.html

NIC Speed:
http://docs.sun.com/source/816-2128/paramset_2.html

Java slow? Research. Ideas:
http://www.biostat.wustl.edu/archives/html/s-news/2001-02/msg00105.html
http://groups.google.com/group/borland.public.jbuilder.ide/browse_thread/thread/a31006d3ab995820/1924a9c0a5d82e4c?lnk=st&q=java+slow+xwindows&rnum=3&hl=en#1924a9c0a5d82e4c

Php arrays:
http://us3.php.net/manual/en/function.in-array.php

SUN Account PW’s and locking/non-login accts.
http://blogs.sun.com/gbrunett/entry/managing_non_login_and_locked

Filesystem Corruption on a Veritas Disk

Filed under Unix Notes on Monday, October 30th, 2006 @ 10:26am by Christen

I had filesystem corruption on a veritas disk. In order to fix it I had to do this:

You will need to:
1) boot from an alternate disk from the ok prompt boot otherlocation -s
2) stop the Veritas volumes vxvol -g rootdg stopall
run a vxprint -htrg rootdg and make sure the volumes are disabled
3) fsck -o f -y /dev/rdsk/c#t#d#s0 where c#t#d# it the rootdisk from a vxdisk list
reitterate until it gives no errors, or until it only gives the “FILE SYSTEM STATE IN SUPERBLOCK IS WRONG” error.
root@hostname: vxdisk list
DEVICE TYPE DISK GROUP STATUS
c1t0d0s2 sliced appldg01 appldg online
c1t1d0s2 sliced appldg02 appldg online
c1t2d0s2 sliced - - error
c2t0d0s2 sliced rootdisk rootdg online
c2t1d0s2 sliced hotspare rootdg online nohotuse
c3t0d0s2 sliced rootmirror rootdg online
c3t1d0s2 sliced appldg03 appldg online
c3t2d0s2 sliced appldg04 appldg online

- then re-enable the rootvol:
vxvol -g rootdg start rootvol

Then check it again, now it checks the mirors too:

fsck -o f -y /dev/vx/rdsk/rootdg/rootvol

4) make sure you can mount the root disk by slices mount /dev/dsk/c#t#d#s0 /mnt
5) umount /mnt
6) reboot off of rootdisk

Word Symbols

Filed under Knowledge Base on Thursday, October 26th, 2006 @ 7:34am by Christen

Or try U+221F, 2220, 2221, 2222 in Unicode fonts (… Type 2221, then =
Alt+X … If you have a Unicode font with those angle symbols installed, =
Word will likely choose it automatically.)

CORE files on SUN Solaris

Filed under Unix Notes on Wednesday, October 25th, 2006 @ 1:29pm by Christen

I expect to find core dump files in /, and I often do, but also if the system crashes, the system core dumps should be saved under /var/crash

Outlook using HUGE amounts of RAM

Filed under Knowledge Base on Tuesday, October 24th, 2006 @ 12:56pm by Christen

Disable add-on “Exchange SCAN”

Feelings are never “wrong” or “bad”

Filed under Xanga on Friday, October 20th, 2006 @ 12:46pm by Christen

Currently Reading The World According to Mister Rogers by Fred Rogers

Godseeker23 said this yesterday: “A kid I babysit found out that “bleeding” is not synonymous with “hurting.” (She stuck her finger in the scissors.) I hate it when kids bleed.”

That got me thinking about emotions. Stopping a person from crying or yelling does not stop the emotion behind the outburst. No one likes to see a kid bleed, but what about watching a kid have an emotional outburst? What about listening to a teenager talk about feelings that you feel are destructive to them? If your son tells you he wants to commit suicide, what do you do? What if your daughter tells you she is in love with a creep? Do you go nuts and tell them they shouldn’t think such things and must stop now?

I know people who were told that they were “bad” or “sinning” when they shared feelings that made their parents uncomfortable. This efficitively taught them to bottle up their feelings and not share them.

The problem is, the feelings don’t go away just because you stop sharing them. In fact, quite the opposite, we tend to more easily release emotions that we have expressed.

Emotions are like gas, if we keep it in, it hurts and makes us feel bad, but if we let it out, then we feel better, and it is done and gone. Sometimes, though, letting it out is embarrasing and makes other people uncomfortable.

The same goes with actions really. When your teenage son comes in with some body alteration (piercing, tattoo, etc) that you generally dislike, what do you say? When your daughter comes down the stairs in some outfit that makes you think more of illicit solicitation what do you do? If your son or daughter starts listening to “death metal,” getting into knives, and generally acting anti-social, what is the right response?

To me I think the first thing on your mind should not be, “You are NOT leaving the house like that!” Instead, the first question in your mind, that you should work to answer, is, “why?” What feelings is my son trying to express through these things that he knows I don’t like? What emotions is my daughter feeling that are causing her to want to dress this way? Then the next thing is not to tell them the emotions are sin.

So, all that, to get here. If my teenager starts acting or dressing strangly, or blows up, I know to talk to them like an adult and discuss their feelings openly. But what do I do with a two or three year old? I want them to feel free to share their feelings or emotions. However, screaming at the top of their lungs, or lying on the floor crying for thirty minutes because they don’t want to put their shirt on is not acceptable. How do I make the line between teaching them to behave themselves, and teaching them to bottle up their emotions?

I have a book of quotes from Mr. Rogers. There is a really good one about how our feelings are not “good” or “bad,” but just “there.” I’ll have to look that up and post it here later. Funny how the cutting edge theology of 2005 completely falls to it’s knees over simple principles that Mr. Rogers was promoting on public television over 20 years ago.

Posted 10/20/2006 12:46 PM

8 Comments:

The way you explained approaching other people gives them room for aspects of their life that you don’t know are there. That’s good. Only God knows everything.
Posted 10/20/2006 11:13 PM by Godseeker23

And you don’t have to tell a person their feelings are bad to get them to stop telling you about it. Just explain to them from the Bible that that’s the wrong way to feel. It works.
Posted 10/20/2006 11:17 PM by Godseeker23

Someone might almost think we’d discussed this subject before. :D It wasn’t planned–honest!
Posted 10/21/2006 10:51 AM by ThoughtForFood

whats crazy is alot of adults have no clue on what to do with their teen or their younger kid. my thoughts are that if you bring them up right you wont run into alot of those problems when they are teenagers. and by the time they are teens they are mature beyond their years so their is no struggle with that. very good post it got me thinkin. lol
Posted 10/21/2006 1:19 PM by mynameischrisandimbored

So what do you do if your kid decides he likes to be correct, dress in a shirt and tie, and other such abnormal behavior. Can that be an indication of something wrong, deep inside?
Posted 11/19/2006 11:31 PM by madhatterb78

You mean abnormal behavior, like wearing polo shirts with the top button buttoned? :P
Posted 11/21/2006 10:54 AM by ThinkingOnTheEdge

lol…a prime example

<—-
Posted 11/22/2006 12:23 AM by madhatterb78

Ted Dekker thinks they are, which got me thinking about it. Not everyone, it’s true–but maybe a subculture, and maybe within the church. Reason isn’t bad, it’s just easier to logicize stuff than to fall in love with Jesus. (Takes less commitment.) You hear what I’m saying, don’t you? What do you think?
Posted 12/6/2006 12:13 PM by Godseeker23

Screen Notes

Filed under Unix Notes on Tuesday, October 3rd, 2006 @ 11:24am by Christen

I found some time recently to play with the screen program.

Telnet into your server.
Now run:
screen -R -T vt100

Now do whatever you want, open a file with less, edit a file in vi, or
start a TUI, or whatever.

Now hit that big X in the upper corner. That is right, just toast your
telnet session, don’t exit out if it, just toast it.

Now log into your server again.
Now run:
screen -R -T vt100

You should be right back where you left from! Screen does not terminate
when your session drops, and it holds whatever programs, or sessions you
have open with it open too. Even ssh sessions to other servers.

I have the line “screen -R -T vt100″ as the last line in my .profile on
my server, and it was saving my tail almost daily while I was WFH. Every
time the VPN dropped me, I didn’t have to start over what was doing, or
wonder just what the patch job did when it got terminated half way
through.

(Technical NOTE: The -R tells screen to reconnect to any unconnected
screen session for the user, and if there isn’t one, start a new one, so
it either starts new, or connects. The -T gives screen the terminal
type. I found that programs like vi went nuts without this.)

Screen does lots of other cool things too. Here are some good sites
about it:
http://gentoo-wiki.com/TIP_Using_screen
http://www.hmug.org/man/1/screen.php
http://www.bangmoney.org/presentations/screen.html

Another cool feature is that two (or more) people can connect to the
SAME screen session. Great for training and collaborating. Since you can
do a telnet/ssh session from screen, there is no need for it to run on
your server, you can just start from your server and go from there. I
haven’t thoroughly tested that feature yet.

Here is my .screenrc file:
hardstatus on
hardstatus lastline
hardstatus string ‘Current:%n %t | %W | %C%A %D, %M %d, %Y’
vbell_msg “BEEP!”
bell_msg ‘BEEP on %n’
vbell off

It gives me a nice status line at the bottom with a list of the open windows within screen and their names. I use some scripts to make sure my new windows get good names when I open them. I haven’t experiemented with the status line much, but it could probably be a lot fancier.
MultiUser Mode:

you have to go to the command mode (ctrl a :) and type multiuser on and
then command mode again and type acladd userid where userid is the
person you want to share with and you have to do that for every userid.

Powered by WordPress