BlogCatalog

Software Blogs - BlogCatalog Blog Directory

Search

Slow Shutdown

Sunday, March 7, 2010

Some people have noticed that they are experiencing a really slow shutdown after installing Windows XP Home or Professional. Although this can be caused a number of ways, the most clear cut one so far is happening on systems with an NVidia card installed with the latest set of drivers. A service called NVIDIA Driver Helper Service is loading up on start up and for whatever reason doesn't shut itself down properly. The service isn't needed and can also increase the amount of memory available to your system. Here is how to disable it.

1: Go into your Control Panel
2: Select Administrative Tools and then click on Services
3: Right click on the file "NVIDIA Driver Helper Service" and then select STOP.
4: To stop this loading up every time you boot up your PC Right click it again and select properties - then where the option "Startup Type" is shown - make sure it is set at Manual like we have shown in the image below.

Read more...

Restricting Logon Access

If you work in a multiuser computing environment, and you have full (administrator level) access to your computer, you might want to restrict unauthorized access to your "sensitive" files under Windows 95/98.
One way is to disable the Cancel button in the Logon dialog box.
Just run Regedit and go to:

HKEY_LOCAL_MACHINE/Network/Logon

Create the "Logon" subkey if it is not present on your machine: highlight the Network key -> right-click in the left hand Regedit pane -> select New -> Key -> name it "Logon" (no quotes) -> press Enter. Then add/modify a DWORD value and call it "MustBeValidated" (don't type the quotes). Double-click it, check the Decimal box and type 1 for value.
Now click the Start button -> Shut Down (Log off UserName) -> Log on as a different user, and you'll notice that the Logon Cancel button has been disabled.

Read more...

Linux Commands for Beginning Server Administrators

Monday, May 4, 2009

arp


Command mostly used for checking existing Ethernet connectivity and IP address

Most common use: arp

This command should be used in conjunction with the ifconfig and route commands. It is mostly useful for me to check a network card and get the IP address quick. Obviously there are many more parameters, but I am trying to share the basics of server administration, not the whole book of commands.

df


Display filesystem information

Most common use: df -h

Great way to keep tabs on how much hard disk space you have on each mounted file system. You should also review our other commands like file permissions here.

du


Display usage

Most common use, under a specific directory: du -a

Easily and quickly identify the size of files/programs in certain directories. A word of caution is that you should not run this command from the / directory. It will actually display size for every file on the entire Linux harddisk.

find


Find locations of files/directories quickly across entire filesystem

Most common use: find / -name appname -type d -xdev

(replace the word appname with the name of a file or application like gimp)

This is a very powerful command and is best used when running as root or superuser. The danger is that you will potentially look across every single file on every filesystem, so the syntax is very important. The example shown allows you to search against all directories below / for the appname found in directories but only on the existing filesystem. It may sound complex but the example shown allows you to find a program you may need within seconds!

Other uses and more complex but beneficial functions include using the -exec or execute a command.
You may also try the commands: locate or try slocate

ifconfig


Command line tool to configure or check all network cards/interfaces

Most common uses: ifconfig and also ifconfig eth0 10.1.1.1

Using the plain ifconfig command will show you the details of all the already configured network cards or interfaces. This is a great way to get a check that your network hardware is working properly. You may also benefit from this review of server configuration. Using the many other options of ifconfig such as the one listed allows you to assign a particular interface a static IP address. I only show an example and not a real world command above. Also review some commands for file permissions here.. Your best bet, if you want to configure your network card using this command is to first read the manual pages. You access them by typing: man ifconfig

init


Allows you to change the server bootup on a specific runlevel

Most common use: init 5

This is a useful command, when for instance a servers fails to identify video type, and ends up dropping to the non-graphical boot-up mode (also called runlevel 3).

The server runlevels rely on scripts to basically start up a server with specific processes and tools upon bootup. Runlevel 5 is the default graphical runlevel for Linux servers. But sometimes you get stuck in a different mode and need to force a level. For those rare cases, the init command is a simple way to force the mode without having to edit the inittab file.

Of course, this command does not fix the underlying problem, it just provides a fast way to change levels as needed. For a more permanent correction to the runlevel, edit your /etc/inittab file to state: id:5:initdefault:

joe or nano


Easy to use command line editors that are often included with the major Linux flavors

Most common uses:
joe filename
nano filename

A real world example for you to get a better sense on how this works:
nano /etc/dhcp3/dhcpd.conf
This allows you to edit using nano the dhcpd.conf configuration file from the command line.

Maybe you are not up to speed on vi, or never learned how to use emacs? On most Linux flavors the text editor named joe or one named nano are available. These basic but easy to use editors are useful for those who need a text editor on the command line but don't know vi or emacs. Although, I do highly recommend that you learn and use Vi and Emacs editors as well. Regardless, you will need to use a command line editor from time to time. You can also use cat and more commands to list contents of files, but this is basic stuff found under the basic linux commands listing. Try: more filename to list contents of the filename.

netstat


Summary of network connections and status of sockets

Most common uses: netstat and also netstat |head and also netstat -r

Netstat command simply displays all sockets and server connections. The top few lines are usually most helpful regarding webserver administration. Therefore if you are doing basic webserver work, you can quickly read the top lines of the netstat output by including the |head (pipe and head commands). Using the -r option gives you a very good look at the network routing addresses. This is directly linked to the route command.

nslookup


Checks the domain name and IP information of a server

Most common use: nslookup www.hostname.com

You are bound to need this command for one reason or another. When performing server installation and configuration this command gives you the existing root server IP and DNS information and can also provide details from other remote servers. Therefore, it is also a very useful security command where you can lookup DNS information regarding a particular host IP that you may see showing up on your server access logs. Note there are some other commands like file permissions that may also help. There is a lot more to this command and using the man pages will get you the details by typing: man nslookup

ping


Sends test packets to a specified server to check if it is responding properly

Most common use: ping 10.0.0.0 (replace the 10.0.0.0 with a true IP address)

This is an extremely useful command that is necessary to test network connectivity and response of servers. It creates a series of test packets of data that are then bounced to the server and back giving an indication whether the server is operating properly.

It is the first line of testing if a network failure occurs. If ping works but for instance FTP does not, then chances are that the server is configured correctly, but the FTP daemon or service is not. However, if even ping does not work there is a more significant server connectivity issue… like maybe the wires are not connected or the server is turned off! The outcome of this command is pretty much one of two things. Either it works, or you get the message destination host unreachable. It is a very fast way to check even remote servers.

ps


Lists all existing processes on the server

Most common uses: ps and also ps -A |more

The simple command will list every process associated with the specific user running on the server. This is helpful in case you run into problems and need to for instance kill a particular process that is stuck in memory. On the other hand, as a system administrator, I tend to use the -A with the |more option. This will list every process running on the server one screen at a time. Read more of our commands on our reallylinux.com help page. I use ps to quickly check what others are goofing with on my servers and often find that I'm the one doing the dangerous goofing!

rm


Removes/deletes directories and files

Most common use: rm -r name (replace name with your file or directory name)

The -r option forces the command to also apply to each subdirectory within the directory. For instance if you are trying to delete the entire contents of the directory x which includes directories y and z this command will do it in one quick process. That is much more useful than trying to use the rmdir command after deleting files! Instead use the rm -r command and you will save time and effort. You may already have known this but since server administrators end up spending a lot of time making and deleting I included this tip!

route


Lists the routing tables for your server

Most common use: route -v

This is pretty much the exact same output as the command netstat -r. You can suit yourself which you prefer to run. I tend to type netstat commands a lot more than just route and so it applies less to my situation, but who knows, maybe you are going to love and use route the most!

shred


Deletes a file securely by overwriting its contents

Most common use: shred -v filename (replace filename with your specific file)

The -v option is useful since it provides extra view of what exactly the shred tool is doing while you wait. On especially BIG files this could take a bit of time. The result is that your file is so thoroughly deleted it is very unlikely to ever be retrieved again. This is especially useful when trying to zap important server related files that may include confidential information like user names or hidden processes. It is also useful for deleting those hundreds of love notes you get from some of the users on your server, another bonus of being a server administrator. :)

sudo


The super-user do command that allows you to run specific commands that require root access.

Most common use: sudo command (replace command with your specific one)

This command is useful when you are logged into a server and attempt a command that requires super-user or root privileges. In most cases, you can simply run the command through sudo, without having to log in as root. In fact, this is a very beneficial way to administer your server without daily use of the root login, which is potentially dangerous.

Note there are other commands for file permissions here. Below is a simple example of the sudo capabilities:
sudo cd /root
This command allows you to change directories to the /root without having to login as root. Note that you must enter the root password once, when running a sudo command.

top


Displays many system statistics and details regarding active processes

Most common use: top

This is a very useful system administrator tool that basically gives you a summary view of the system including number of users, memory usage, CPU usage, and active processes. Often during the course of a day when running multiple servers, one of my Xwindows workstations just displays the top command from each of the servers as a very quick check of their status and stability.

touch


Allows you to change the timestamp on a file.

Most common use: touch filename

Using the basic touch command, as above, will simply force the current date and time upon the specified file. This is helpful, but not often used.

However, another option that I've used in the past when administering servers, is to force a specific timestamp on a set of files in a directory. Read more of our commands on our reallylinux.com help page.

For instance, to force a specific date and time upon all files in a directory, type:
touch *

You can also force a specific date/time stamp using the -t option like this: touch -t200103041200.00 *
The command above will change all files in the current directory to take on the new date of March 4th, 2001 at noon. The syntax follows this pattern: YYYYMMDDhhmm.ss

YYYY represents the four digit year, then the two digit month, day, hour and minutes. You can even specify seconds as noted above. In any case, this is a useful way to control timestamps on any files on your server.

traceroute


Traces the existing network routing for a remote or local server

Most common use: traceroute hostname

(replace hostname with the name of your server such as reallylinux.com)

This is a very powerful network command that basically gives the exact route between your machine and a server. In some cases you can actually watch the network hops from country to country across an ocean, through data centers, etc. Read more of our commands on our reallylinux.com help page.

This comes in handy when trying to fix a network problem, such as when someone on the network can not get access to your server while others can. This can help identify the break or error along the network line. One strong note to you is not to misuse this command! When you run the traceroute everyone of those systems you see listed also sees YOU doing the traceroute and therefore as a matter of etiquette and respect this command should be used when necessary not for entertainment purposes. A key characteristic of gainfully employed server administrators: knowing when to use commands and when not to use them!

w


An extension of the who command that displays details of all users currently on the server

Most common uses: w

This is a very important system admin tool I use commonly to track who is on the server and what processes they are running. It is obviously most useful when run as a superuser.

The default setting for the w command is to show the long list of process details. You can also run the command w -s to review a shorter process listing, which is helpful when you have a lot of users on the server doing a lot of things! Remember that this is different than the who command that can only display users not their processes.

who


Tool used to monitor who is on the system and many other server related characteristics

Most common uses: who and also who -q and also who -b

The plain command just lists the names of users currently on the server. Using the -q option allows you to quickly view just the total number of users on the system. Using the -b option reminds you how long it has been since you rebooted that stable Linux server!

Read more...

Linux Graphics-related commands

kghostview my_file.ps
(in X terminal) Display a postscript (or pdf) file on screen. I can also use the older-looking ghostview or gv for the same end effect. I can print the postscript file from the viewer too.

xpdf my_file.pdf
(in X terminal) View a pdf file. For viewing pdf files, I prefer the Adobe Acrobat Reader for Linux (it is faster):
acroread my_file.pdf
It can be downloaded from: http://www.adobe.com/products/acrobat/readstep2.html

enscript my_file.txt -U 2
Convert a text file to postscript and print it to the default printer. I could also send the output to a postscript file:
enscript my_file.txt -U 2 -o my_file.ps
The option -U 2 makes enscript print 2 logical pages on one physical page which saves me paper, and creates more convenient, compact printouts. You may also select four pages per page, more makes the printout kind of difficult to read. enscript is really flexible, see man enscript to select from among the many formatting options.

ps2pdf my_file.ps my_file.pdf
Make a pdf (Adobe portable document format) file from a postscript file.

mpage -2 my_file.ps > new_file.ps
Print the postscript file my_file.ps, outputting two logical pages on one physical page. Save the output to the file new_file.ps.

ps2ps file.ps new_file.ps
psnup -nup 2 -pletter new_file.ps new_file2.ps
Another way of making a postscript file containing 2 logical pages on one physical page. First, I used the "postscript distiller" ps2ps to make the postscript file simpler (at the cost of it becoming much larger). Then, I used the psnup utility to make new_file2.ps which contains 2 logical pages per one physical page. I could have also put 4 or 8 logical pages per one physical page.

gimp
(in X terminal) A humble looking but very powerful image processor. Takes some learning to use, but it is great for artists, there is almost nothing you can't do with gimp. Use your mouse right button to get local menus, and learn how to use layers. Save your file in the native gimp file format *.xcf (to preserve layers for future editing) and only then flatten it and save as png (or whatever) for use. "Learning how to make proper selection is the key."

gphoto
(in X terminal) Powerful photo editor and camera image acquisition program.

kpaint
(in X terminal) Simple bitmap paint program ("paintbrush"-type).

xfig
(in X terminal) A simple drawing program. Useful for making elementary sketches or diagrams.

dia
(in X terminal) A tool for drawing diagrams from pre-built components.

display my_picture
(in X terminal) Display a picture for viewing only. You can also type display & and select file from the menu to view the image, rotate it , change its colour, apply certain effects, etc. display is part of ImageMagick package, together with several other utilities described below.

identify -verbose my_picture
Give me a description of an image file my_picture: format, type, class, size in pixels, number of colours, size in bytes, etc.

convert -geometry 60x80 my_picture.gif out_small_picture.gif
Scale a picture to a size 60x80 pixels. See a few line down for an example how to use convert to convert between different graphical file formats.

animate -delay 6x5 pic1 pic2 pic3
Keep showing two or more pictures in sequence. In the example above, the picture files are named pic1, pic2 and pic3, the delay between pictures is 0.06 second, and the whole presentation sequence is repeated in 5 seconds.

combine pic1 pic2 combined_pic.miff
Combine two or more images to another image. You can for example put a logo on every image.

montage -geometry 800x600+0+0 my_picture montage.miff
Create a tiled image from my_picture so that the total size is 800x600 pixels, with 0x0 border. The output goes to the file montage.miff.

zgv my_picture
Display a picture for viewing on a vga screen (no X necessary).

giftopnm my_file.giff > my_file.pnm
pnmtopng my_file.pnm > my_file.png
Convert the proprietary giff graphics into a raw, portable pnm file. Then convert the pnm into a png file, which is a newer and better standard for Internet pictures (better technically plus there is no danger of being sued by the owner of giff patents).

xwd -out my_cupture_screen_file.xwd
(in X terminal) Capture the contents of X-windows screen into a graphics X-windows "dump" file (*.xwd). You can later convert the xwd file into your favourite format using the convert utility. Unde KDE, you can also use the keyboard shortcuts or to copy the current window or the entire desktop into the clipboard.

convert my_capture_screen_file.xwd my_capture_screen.jpg
Convert the X-windows screen dump file (*.xwd) into the *.jpg file format. The convert utility can convert graphics from/to many different file formats.

import -display 192.5.100.10:0 -window root my_file.jpeg
Capture the contents of the root screen from X-windows runnning on server 192.5.100.10 display 0. The output file is my_file.jpeg (change the file format by giving it an appropriate filename extension). You need to have the permission to write to the screen in order to be able to capture its content (the permission to everybody can be given by running xhost + in the X-terminal). See man import for options.

ksnapshot
(in X terminal) GUI-based utility to capture screen contents.

xine frankenstein.avi &
(in X terminal). Watch the movie from the file "frankenstein.avi". Looks better than on a TV :))

Read more...

Linux Music-related commands

cdplay play 1
Play the first track from a audio CD. Use cdplay to play the whole CD. Use cdplay stop when had enough.

eject
Get a free coffee cup holder :))). (Eject the CD ROM tray). This command defaults to the cdrom, but could be used to eject other removable media by specifying the mount point or device. E.g., I can eject the zipdisk from a parallel-port (external) zipdrive (as root) using: eject /dev/sda4

play my_file.wav
Play a wave file.

rec my_file.wav
Record a wave file from my microphone.

mpg123 my_file.mp3
Play an mp3 file.

mpg123 -w my_file.wav my_file.mp3
Create a wave audio file from an mp3 audio file. Useful if you wanted to write a regular audio CD from mp3s--you have to convert the mp3s to the *.wav format first. Don't be surprised the conversion is slow--decompressing mp3s is very processor intensive.

xmms &
(in X terminal) Nice GUI mp3 player.

freeamp &
(in X terminal) Another GUI mp3 player.

lame input_file output_file
MP3 encoder. You may need to download and install it yourself (standard Linux distributions avoid supplying it because of disagreement about patents on the mp3 compression technique).

knapster
(in X terminal) Start the program to downoload mp3 files that other users of napster have displayed for downloading. You may share your mp3s too. Really cool, while it lasts. Gnutella and FreeNet will soon replace them->it gets even cooler.

cdparanoia -B "1-"
(CD ripper) Read the contents of an audio CD and save it into wavefiles in the current directories, one track per wavefile. The "1-" means "from track 1 to the last". -B forces putting each track into a separate file.

grip&
(in X terminal) A GUI to ripping (see the previous command).

playmidi my_file.mid
Play a midi file. playmidi -r my_file.mid will display text mode effects on the screen.

sox audio_file another_format_audio_file
(="SOund eXchange") Convert from almost any audio file format to another (but not mp3s). See man sox for the list of supported audio file formats (many). sox also lets you add special effects to your sound file.

kscd
(in X terminal) CD player.

kmidi
(in X terminal) MIDI player.

kmid
(in X terminal) MIDI/caraoke player.

kmix
(in X terminal) Sound mixer.

studio&
(in Xterminal) Sound Studio--edit sound files, add effects, etc. Available on the on the PowerTools CD, RH7.x.

extace&
(in Xterminal) Sound visualization utility.

festival --tts my_file.txt
Say the content of the my_file.txt file (ascii text). "festival" is a speach synthesizer that comes on the RedHat 7.0 "Linux PowerTools" CD. To say something from the command line, you need to start up "festival" and then, at the "festival>" prompt, type the appropriate command ("scheme" language interpreter), as in this example (bold represents the prompt):
festival
festival>(SayText "good dog, really good dog")
festival> (quit)

Read more...

About This Blog

Software Blogs - BlogCatalog Blog Directory

bili sao

  © Blogger templates Newspaper II by Ourblogtemplates.com 2008

Back to TOP