存档

2005年7月 的存档

Marvell Ethernet device

2005年7月30日 没有评论

There are some error messages displayed after installed Marvell Ethernet device in Linux operating system such as Red Hat AS 3.0 and Fedora 1.I issued the following command to check ethernet device’s driver information.

# dmesg | grep eth

Though errors were listed,the other things run very well.Using the ping command to test Marvell Ethernet device is ok,and I could find the right configuration of Marvell Ethernet in the GUI interface.It seems Marvell Ethernet device could work normally.But I still confused why these error messages were showed.

In the Marvell’s installation manual,it shows the matter I meet is caused by compiling in single processor statue.But in factor,there are two Xeon processors in my platform.Why and How?
I’ve called Intel’s support term,they did the installation test and then told me there are no error messages.Did I install the device in a wrong way?

First,I choose the second step to create a pitch during installation.Second,issue the following command:

# ./install.sh

When the driver’s compiling completed,

# modprobe sk98lin

In the GUI,System Setting – Network,I could find Marvell Ethernet device in the hardware list.Click the Device tip, and then click New button to create new profile.For example,Devices – New – Ethetnet Connection ,select Marvell Ethernet device and configure it.Finally,issue the checking command again:

# dmesg | grep eth0

I found no error messages were showed. and then I rebooted system.
In the Linux services,kutzu serviee was used to check and configure new hardware.In the first time rebooting after install Marvell Ethernet device,kutzu asked users to configure the new hardware.
Because I’ve installed Marvell Ethernet device,I choose “Do Nothing” .I issued “# dmesg | eth0”,everything is ok.how could this happen?I think maybe I usually choose “Configure the device” in the kutzu service,and the error messages exist.

分类: 科技 标签:

Sendmail service

2005年7月21日 没有评论

DNS,domain name server,usually has a cache server in the font which has a special database.If the request are listed in the database of cache server,turn the specified IP address to user.If the request could not be found,the cache server pass the request to the really DNS server to resolve the address.The /etc/named.conf file contains the parameters of DNS setting,and the /etc/named/named.ca is owned by cache server.The file named “named.ca” will ofen be updated,there are total 13 root DNS server all around world,these root machine’s IP address are indicated in the “named.ca” file.

E-mail system has two main partitions:UA(user agent) and MTA(Message Transfer Agent).US are installed in the client used to write and read mails,many softwares are developed for US,for example,Outlook express,Foxmail or Evolution of Linux.MTA is also called mail server which provides storage and re-sending the mails utilities.There are three common protocol:SMTP,POP3 and IMAP.SMTP(simple mail transport protocol) put the mail to the target address step by step.IMAP(Internet Message Access Protocol) acts like POP3 which is more popurlar.

Linux Mail Server are the following:Sendmail,Qmail,CommuniGate ProMessaging Server for linux,Mail studio 2000.

Sendmail service is installed in the Linux by default.It re-writes the mail’s address,if the address is local,the mail will be saved at /var/spool/mail.

# /etc/rc.d/init.d/sendmail start
# /etc/rc.d/init.d/sendmail stop
# /etc/rc.d/init.d/sendmail restart
分类: 科技 标签:

Grub and Send mail in telnet

2005年7月20日 没有评论

In the morning, When inserted the USB device and issued the “fdisk -l” command,there was no item for USB device like sda1 in the list.I had to restart the computer and issued the former order again,the same thing happened with the following messages:

usb.c: USB device 2 (vend/prod ox9a6x0x8001) 
is not claimed by any active driver.

I was very surprised,and then tried to execute the command:

# mount /dev/sda1 /mnt/usb
# ls /mnt/usb

It’s very strange!I could read the files from the USB device.I still did not know the reason.

Grub configuration. Grub is used to boot,it is written in the MBR(boot sector) of harddisk.Grub can boot many operating systems,such as NetBSD,windows.The /boot/grub/grun.conf is the boot manu created by grub,it also contains some important setting information.I will explain this file in detail. The string “timeout” of this file indicates the period of timeout,and the “default = 0” is used to set the default boot operating system,0 is the first listed operating system, and 1 means the second.The string “title” is the name of operating system, users can modify this name by themselves.I’ve renamed the Windows in this way.However,grub does not support Chinese.Splashimage is the backgroud of grub when starts the program.We can also modify this file whch is ofen in .xpm.gz formation,set our favorite picture to be the new background.I edited a picture and used “gzip -1 1.xpm” to create file named “1.xpm.gz”.however,the effection is not good.In my offic computer,the boot partition is known as (hd0,5) by the grub,but Linux recognizes the boot partition as hda6 by issuing “fdisk -l” command.

For example,” Kernel /vmlinuz-2.4.20 ro root=/dev/hda7 “.”/vmlinuz-2.4.20” means the loading kernel,and “ro root = /dev/hda7” is used to pass parameter.Here “ro” means read only.
“initrd” is used to initialize the linux image.Grub used chainloader technology to load other system’s boot information(eg Windows) into the grub boot loader.This statue seems like a chain so we always call this methed “chainloader”

How to make a grub boot disk?

# mke2fs /dev/fd0
# mount /dev/fd0 /mnt/floppy
# mkdir /mnt/floppy/boot
# mkdir /mnt/floppy/boot/grub
# cp /boot/grub/stage1 /mnt/floppy/boot/grub
# cp /boot/grub/stage2 /mnt/floppy/boot/grub
# grub
grub>root(fd0)
grub>setup(fd0)
grub>quit

How to recovery the grub distroied by Windows?
At first,startup the system by Linux setup CD,and when the installation interface is displaying,press F4 to run into linux rescue mode.

sh#
sh# grub
grub> root(hdx,y)    Here y means the boot partition of linux.
grub>setup(hd0)  Written grub to the MRB of harddisk device.

If grub hasn’t menu for user,how could us start operating system?
Get into the grub command line:

grub>cat (hd0,6)/grub/grub.conf  
(Check the parameter of grub.conf,
note the 'hd0,6' is the boot partition,and then use this parameter to boot)
grub>root(hd0,6)   
grub>kernel(hd0,6)/vmlinuz-2.4.20 ro root=/LABEL=/
grub>initrd (hd0,6)/init-2.4.20-9.img
grub>boot

What can I do if I forget the password of root?
In the grub,press “e”, and add “single” following “kernel(hd0,6)/vmlinuz-2.4.20 ro root=/LABEL=/”,note there is blankspace between “/” and “single”.

grub>kernel(hd0,6)/vmlinuz-2.4.20 ro root=/LABEL=/ single
and then press "enter" and "b" to start the system in single mode.
bash#
bash#passwd root

Here change the password of root.

I had two harddisk with each one has operating system.They were installed separately.One is Linux, and other is Windows.How could add windows boot information to linux’s grub (hd0,0)?
check the /boot/grub/device.map to identify whether “hd1” exist or not.If there was not,we shuold add it manually.and then issue the following command in grub:

grub>map(hd0) (hd1)
grub>map(hd1) (hd0)

This method i do not test is not sure.I’ll try later.

Sending email in telnet:

# telnet mail.phillip.com 25
   helo
   mail from: user@test.com   
  (The mail do not really exist,if use formation like "xxx@phillip.com", 
   the connect was off  because it need certify the user.)
   rcpt to: master@phillip.com
  (The mail must based on "@phillip.com" domain)
   date    (Start writing content)
  mime-version=1.0
  from: phillip@milan.com
  to: cocu@barcelona.com
  cc: huang@china.com
  subject: test letter  
 (Here we should press "enter" twice because of RFC882 rules)

(Here is the main content,and then type "." when complete)

.
quit   (quit the mail server)

I tried this method many times,but many letters were considered as rubbish letters.

分类: 科技 标签:

Runlevel – morning / iostat – afternoon

2005年7月19日 没有评论

1st: Runlevel – morning
A runlevel is a software configuration of the system which allows only a select group of processes to exist.The processes spawned by init for each of these runlevels are defined in the /etc/inittab file. Init can be in one of eight runlevels: 0-6 and S or s.The runlevel is changed by having a privileged user run telinit,which sends appropriate signals to init,telling it which runlevel to change to.

Runlevels 0,1 and 6 are reserved.Runlevel 0 is used to halt the system,runlevel 6 is used to reboot the system,and runlevel 1 is used to get the system down into single user mode.Runlevel S is not really meant to be used directly,but more for the scripts that are executed when entering runlevel 1. S or s will bring system to single user mode and do not require /etc/inittab.

Init is invoked, as the last step of the kernel boot sequence,it looks for the file /etc/inittab to see if there is an entry of the type initdefault.

When starting a new process,init first checks whether the file /etc/inittab script exists,if it does,it uses this script to start the process.Each time a child terminates,init records the fact and the reason it died in /var/run/utmp and /var/log/wtmp provided that these files exist.

After it has spawned all of the processes specified,init waits for one of its descendant processes to die, a powerful signal or until it is signaled by telinit to change the system’s runlevel.When one of the above three conditions occurs,it re-examinates the /etc/inittab file.New entries can be added to this file at any time.However,init still waits for one of the above three conditions to occur.

To provide for an instantaneous response,the telinit Q or q command can wake up init to re-examinate the /etc/inittab file.

I tried some test after reading init command manual.The results are listed here.
init 1 telling INIT to go to single user mode.
init 3 restart the system to run in test mode
init 4 restart those service which is default selected but had been cancelled
init 5 get the system to run in GUI mode
init 6 reboot the system

2nd: iostat – afternoon
The target is to get the transfer rate of harddisk reading and write in Linux.Throught seaching in the internet, I used command “hdparm” in the following way: # hdparm -t -T /dev/sda,but I can only get the report about reading and write data from the cache of the harddisk.It’s not useful.
I had to read more documents in the internet,and then find the command named “iostat”.Issue this command in the terminate: # iostat, and then bash told me there was not iostat existing.So I want to locate the iostat command:
#find -name ‘*stat’,as the result,serveral commands about status are listed in the /usr/bin directory,except iostat.What’s the matter?I thought perhaps the problem had some relation with packages installed.

In the Gnome,clicked icon in the toolbar in the following sequence: Applications – System Setting – Add/Remove applications. I checked the packages one by one, and then found the option which said “sysstat-The sar and iostat” contained in the “System Tools Package Details” item.However,this option is not selected by default.Then,choose this item and run updating program that need RHEL 4.0 installation CD 2 and CD3.
After updated,rebooted the operating system and issued the iostat again.That’s find. A report was printed in the screen.We can get statistic about block mount without no parameters added.The data transfered in kilobyte formation seems more useful for us,we can add “-k” following iostat command.for example,# iostat -k

As Oracle’s statepack,we could get the informating at serveral time interval.

# iostat 2 6

It will display six reports at two seconds interval. I got a low transfer rate when no program was running on the system.By using stress which is a common testing tool for Linux,the rate raised much higher when the stress testing block size was from 1G to 3G:

#stress -c 4 -d 2 --hdd-noclean --hdd-bytes 1G(or 3G later)

(138000kB/s when 3G was defined as parameter)
That was the number what we want to get.

分类: 科技 标签:

Blowing in the wind

2005年7月18日 没有评论

How many roads must a man walk down
Before they call him a man
How many seas must a white dove sail
Before she sleeps in the sand
How many times must the cannon balls fly
Before they’re forever banned
The answer, my friend, is blowing in the wind
The answer is blowing in the wind

How many years must a mountain exist
Before it is washed to the sea
How many years can some people exist
Before they’re allowed to be free
How many times can a man turn his head
And pretend that he just doesn’t see
The answer, my friend, is blowing in the wind
The answer is blowing in the wind

How many times must a man look up
Before he can see the sky
How many ears must one man have
Before he can hear people cry
How many deaths will it take
‘Till he knows that too many people have died
The answer, my friend, is blowing in the wind
The answer is blowing in the wind

分类: 科技 标签:

POP3 commands

2005年7月18日 没有评论

POP3(Post Office Protocol 3),the 3rd version of post office protocol.It specifies the protocol which contain connection between mail server and person computer,and then downloading the mail from servers.POP3 is the first offline protocol of mail receiving.POP3 server is the mail server following the POP3 protocol.

POP3 commands:

USER username
PASS password
APOP name,digest
STAT status of mail
UIDL n
LIST n list all mails and indicate number and size
RETR n retrieve the content of mail
DELE n delete the mail
RSET comment all delete issues
TOP n,m return the first m lines of the No. n mail
NOOP
QUIT exit
I used telnet to test POP3 commands,for example,issue the following comands in the ternimal:(Note,the port of POP3 is 110)

# telnet mail.tom.com 110
Trying 219.133.55.213...
Connected to mail.powerleader.com.cn (219.133.55.213).
Escape character is '^]'.
+OK POP3 ready

And then,input username and password to list and read all mails.

Identify the language supported by the operating system:

# locale -a 

This command will list all languages supported.

Checking the new hardware:

# /etc/init.d/kudzu {start | stop}
分类: 科技 标签:

Hot and friend indeed

2005年7月17日 没有评论

It’s very hot, and I was sick. Feel terrible and have no spirit.
Computer is a friend indeed who does never lie.
It always tell me the turth,whenever and wherever.

分类: 科技 标签:

Saturday morning

2005年7月16日 没有评论

Play a directory contains music files (mp3,wmv) by issuing the following command:
# mplayer /mnt/c/0701
mplayer will play all the music in order automaticlly.It’s funny and convienence.
In this morning ,listening soft music makes my heart clear, in other words, reset myself operating system.I always consider that peope is such system with high advanced spirits.

How to display Chinese language in lynx browser? In my home machine whose operating system is Fedora Core 3,I could not display Chinese of both GB2312 and Big5. When I installed lynx in the office, by updating packages supplied by Red Hat 9.0 CD2,it will be fine where system environment is supporting Chinese.
However,this only can be tested successfullly in the terminal when X service has beening runing.In the console mode,lynx could only work well with English language.It’s annoy.

If no response when issue the rpm command,we can resolve in this way:
# rm -rf /var/lib/rpm/-db.*

Checking which program was running in the port22,
# lsof -i :22
lsof means list open files.Using the following commands to identify which programs are running in the defined process’s name and ID:
# lsof -c processe’s name
# lsof -p PID (process’s ID)

For high security,I created user count name “Phillip”.when I log with this user,
and open a new terminal, issue the commands:
#su root
Password:
#fdisk -l (and df, ifconfig so on)
bash:fdisk:command not find.
Attention! There is nothing between string “su” and “root”.I modified this command : # su – root (there are a blankspace between the “-” and “root”,it is very important). and then execute those commands like fdisk,df,ifconfig, everything is ok now.

If the system cannot connect to the Internet through the ethernet device is installed rightly and has been activate,we can try to find the error reason in the following way:
# ping itself(192.168.1.x,or 127.0.0.1)
# ping default gateway
# tracerouter DNS server’s IP address
and if all the above testing was passed,issue the following commands:
# nslookup www.163.com
# ping www.163.com
# tracerouter www.163.com
Using 163.com to test error happens in which step.

Gateway:192.168.1.0 equals 255.255.255.0

#host
#host -t MX powerleader.com.cn
powerleader.com.cn mail is handled by 10 mail.powerleader.com.cn
powerleader.com.cn mail is handled by 5 mailgate powerleader.com.cn

Watching the router’s infomation:
# netstat -n
# router -n
netstat: print network connections,routing tables,interface,statistics,masquerade connections and multiacst memberships.

Identify which mode the Fiber device is working in:
# getconf WORD_BIT
the result is 32 in my PC which is 32bit system in the office,and will be 64 (bit) in those 64bit platform.

分类: 科技 标签:

Fedora/mplayer

2005年7月15日 没有评论

In Fedora Core 3, I installed mplayer with rpm package. Issuing the following command to play DVD programs:

# cat /etc/fstab  

Identify the dvd mounting point.For example, the location is /dev/hdc.

# mplayer /dev/hdc

Then a playing windown jumpes out, and it will play the DVD .However , I still could not play the file as wmv format. I found the reason may be mplayer should get better performance through compliering installation which will get play in higher quarlity and I/O rate.Realplay10 for linux also be installed in my computer,but I can only hear the voice,no picture displayes.I have not found the key to resolve this problem.

Fedora 1 in SE7520JR2
After installing Fedora1 in SE7520JR2(PR2700) platform, I try to add two ethernet device which are Marvell and Intel Pro1000 to the operating system.First,Intel Pro1000 device was choose to install, at final step,I issue the following command:insmod e1000, in order to add device to the running kernel.Second,complied the Marvell source code.But some thing wrong happened.Only one ethernet device was found in the module list through executing the command:

#dmesg | grep eth

So I changed the queue .Install Marvell at first and then install Intel Pro1000 device.Hmmm,

#lsmod sk98lin          
- dedicate the Marvell ethernet deviee was active.
#lsmod e1000            
- in this way,I found e1000 module was unused.

Then, I used the command:

#ifconfig eth1 up

One ethernet device(Marvell) was found in the network device list,but two hardware recognized by the Linux were listed.

#cd /etc/sysconfig/network-script
#cp ifcfg-eth0 ifcfg-eth1

and edit parameters in ifcfg-eht1.

# service network restart

OK,two network devices were installed successfully.

分类: 科技 标签:

Linux tips

2005年7月13日 没有评论

What is patch? Apply a diff file to an original.
What is hwclock? Query and set the hardware clock.

In RedHat Linux,issue the following command to modify the time or date:
#timeconfig
select Asica/Shanghai
#ntpdate
sync the time with the specified time server
#date

Instead of strings in vi tools:
:%s/string/new_string/8

Check the running leve:
#runlever
I issue this command in GUI of Linux 9.0, the result was 3.

Identify the logining user:
#who am i
#whoami print effective user id
#id print read and effective UIDs and GIDs

We can create and edit this file “/etc/motd” to display own messages when login in.

What is “NONUS”? It means non-US.
Execute the following command to reset the language of system:
# export LANG=”en-US”
Sometimes,this method resolves some Code displaying matters.

分类: 科技 标签: