Thursday 1 October 2009

How to check memory size in Solaris

ref : http://sysdigg.blogspot.com/2007/12/how-to-check-memory-size-in-solaris.html
There are various options to check memory in Solaris. I am running Solaris 8 on Sun Fire server, these Solaris commands can run on any x86 or SPARC platforms.

1. Check real/physical memory size in Solairs using dmesg (message information during boot time ):

# dmesg |grep mem

Dec 14 21:56:21 bos-solaris unix: [ID 168242 kern.info] mem = 523836K (0x1ff8f000)

This Solaris server has 512 mb physical memory ,dmesg output show memory in kilobytes which is 512 Megabytes.

2. Check memory size in solairs using prtdiag (only on sparc) :

# /usr/platform/sun4u/sbin/prtdiag |grep Memory

Memory size: 512 Megabytes

Running prtdiag output show memory as 512 megabyes

3. Check Memory size in Solaris using prtconf :

# prtconf -v |grep Mem

Memory size: 512 Megabytes

Running prtconf with –v shows memory size in megabytes

How to check Linux release/update in RHEL/fedora/CentOS

ref : http://sysdigg.blogspot.com/2007/12/how-to-check-linux-releaseupdate-in.html
How to check Linux release/update in RHEL/fedora/CentOS

To upgrade fedora, centos and Redhat enterprise Linux you need to know what release and what update you are currently running on your server. You can check release by running uname –r, but uname –r shows kernel release not the Linux OS release/updates. Here is how you can check Linux OS release and updates:

In Redhat enterprise linux,fedora and centos to check update running :

In Redhat enterprise Linux 5 (RHEL5) to check release and update run command:

#cat /etc/redhat-release

Red Hat Enterprise Linux Server release 5.1 (Tikanga)

Looking into redhat-release file contents reveals that my Linux server is running Redhat Enterprise Linux release (RHEL5) 5.1 and base OS namaed Tikanga.

In Redhat enterprise Linux 4(RHEl4) to check release and update run command:

[root@svn ~]# cat /etc/redhat-release

Red Hat Enterprise Linux ES release 4 (Nahant Update 3)

This Linux server running RHEL4 (code name= Nahant) with installed update 3.

In Fedora to check release and update run following command:

#cat /etc/redhat-release

Fedora release 8 (Werewolf)

This Linux server running Fedora 8 and base OS named Werewolf

On Debian I don't find any command to check Linux OS update. If anyone find the command to check what debian update is installed please let me know. However I find glimpse of

Update in /etc/issue:

#cat /etc/issue :

Debian GNU/Linux 4.0 \n \l

How to Check Disk space in Linux

ref : http://sysdigg.blogspot.com/2008/03/how-to-check-disk-space-in-linux.html
How to Check Disk space in Linux

For Linux beginners sometimes it's very hard for them to perform simple administration tasks like check available disk space. I know some Windows folks at my work who tried to get their hands into Linux so they installed Fedora 8 on PC. But soon they realized that they couldn't do some basic tasks like check free disk space, sharing directories, configuring printers etc etc to name a few. Checking disk space I Linux is not very difficult in Linux .There are two ways to check disk space in Linux

* Check disk space in Linux using command line
* Check disk space in Linux by using Graphical tool if you have some sort of graphical desktop installed.

Check disk space using command line in Linux:

Open command terminal

window if you are running Graphical windows manager. If you don't know how to open

command terminal window see how

Run df –h , UNIX friendly way is to run df –k but if want disk

space displayed in Megs and Gigabytes then use df –h :

[root@fedoradev]# df -h

Filesystem Size Used

Avail Use% Mounted on

/dev/mapper/vgroot-lvroot

20G 12G 7.2G 62% /

/dev/cciss/c0d0p1 97M 16M 76

M 18% /boot

none 2.0G 0 2.0G 0% /dev/shm

/dev/mapper/vgdata-lvdata 22G 62G 245G 21% /data

Check disk space in Linux using GUI:

From command line run command:

[root@fedoradev # baobab &

OR

From desktop Select Systems Tools from Applications and then select Disk usage analyzer, this will launch a GUI window.

Select Filesystem icon

if you want to check the disk space for the file systems or select Folder icon if you want to see disk space for each and every directory on your Fedora machine

How to check Memory size in Linux

ref : http://sysdigg.blogspot.com/2007/12/how-to-check-memory-size-in-linux.html
How to check Memory size in Linux

In all Linux operating Systems memory size can be checked by running dmesg,free, top and using Kernel proc information. Linux is very cool it offers various pre-installed tools and commands to check memory size compared to UNIX Operating systems.

To check memory size in Linux using dmesg, run the following command:

[root@earth ~]# dmesg |grep -i memory

Memory: 4084332k/4653052k available (1868k kernel code, 43456k reserved, 755k data, 180k init, 3211208k highmem)

Running dmesg command in Linux displays memory in kilobytes, on this Linux server total memory size is 4 Gg.For checking memory dmesg command is also available in Solaris and HP-UX.To check memory size in linux using /proc information run following from the command line:

[root@svn ~]# cat /proc/meminfo |grep -i memtotal

MemTotal: 4086484 kB

/proc/meminfo shows total memory size configured as 4086484 displayed in kilobytes (KB).

To check memory size on Linux using free command, run the following:

[root@svn ~]# free

total used free shared buffers cached

Mem: 4086484 4033924 52560 0 71764 3122188

-/+ buffers/cache: 839972 3246512

Swap: 4194216 376 4193840

Free command on linux also displays used,free memory,cached memory ,shared and memory

buffer size. You can use –m option to check Linux memory utilization in megabytes:

[root@svn ~]# free -m

total used free shared buffers cached

Mem: 3990 3523 467 0 69 2649

-/+ buffers/cache: 804 3185

Swap: 4095 1 4094

Linux also comes with top command, top can be run to check real memory size and memory utilization.Top display total memory size,used memory,free memory ,memory buffers size and swap memory utilization :

top - 08:05:36 up 6 days, 16:46, 7 users, load average: 0.07, 0.09, 0.08

Tasks: 131 total, 1 running, 130 sleeping, 0 stopped, 0 zombie

Cpu(s): 4.2% us, 0.5% sy, 0.0% ni, 95.3% id, 0.0% wa, 0.0% hi, 0.0% si

Mem: 4086484k total, 3609956k used, 476528k free, 71752k buffers

Swap: 4194216k total, 1100k used, 4193116k free, 2713504k cached

Ubuntu and fedora linux also comes with package called lshw (list hardware) which provides

detailed information on memory size, how many memory dims available, memory slots free along with other Linux system Hardware information .Run lshw and scroll down to *-memory section :

#lshw |grep

*-memory

description: System Memory

physical id: 39

slot: System board or motherboard

size: 1GB

Saturday 26 September 2009

Setting Up a FTP server with SSL

Ref: http://filesharingtalk.com/vb3/f-guides-and-tutorials-65/t-setting-up-ftp-server-ssl-276623/
Sever Setup


1. Download Filezilla server software on your server. Click Here.

2. Install with default settings.

3. We will be restricting which IP's can access the server's ftp. Click Edit, Settings, General Settings, IP filter.

The top box is where you can block IP's from accessing the FTP, the easiest method is to build your range and have you ip be excluded, rather then build a custom range around your ip.



Paste the following into the block list:
*.*.*.*

That will automatically block all IP addresses.

4. Add your ip to the addresses to be excluded from the block, the lower box.

5. Since we are in the general settings, we will tweak a few other things. In the general settings, change the port to 990, Change connection time out to 0, no transfer time out 800, login timeout 60. Those are what I use as the default always messes with some of my friends clients.



6. I personally delete the welcome message, its up to you though.

7. Go to SSL/TLS settings, Check the enable box, check allow explicit box, and check force explicit box.



8. Generate a new certificate by clicking the button. I always select the maximum encryption, 4096byte. All the information can be random, EXCEPT for common name (server address), put the servers ip address there. Select where you want to save it, and generate it.



9. Go back to the ssl/tls settings page, for the private key file and certificate file, browse to the certificate you just made. Set a key password. You can finally click ok, as we are done with the server settings.




10. Create a user group: Edit-->groups

11. Click add, make it whatever name you want.



12. Check all three boxes there, adjust max. connection to 100 and connection limit to 0



13. Click the shared folders tab...click add. Select your group on the right, then the add folder button willl be the main directory that you will see when you log in. I always just have everything downloaded into one folder and just share that one folder as it is easier.




14. Click ok.

15. Now create a user for your group ----Edit---users

16. Add them, make them a part of the user group you made.

17. Then put checks in all 4 boxes on that screen (enable account, password, bypass server, force ssl) Set max connection count and connection limit to 0 and Click ok.




Now that is the server side...next up is client side.

Client Side:

You can use any client that supports SSL, however I highly recommend using a client like Cuteftp as it takes advantage of multipart download, which is very important if speed means anything to you. For mac users, they also have a mac version of their client. Link is provided below to their overview page.

1.Download CuteFTP professional...Click Here for their home page

2. After you install it, on startup, it will bring you through the connection wizard. If it doesnt, click the wand with the star under the "file" tab.

3. Host address is your servers ip...click next.



4. Put in the username and password you made on the server.



5. When you click next, it will try to verify the server, cancel this. As it wont be able to connect due to the ssl not being set up yet.



Then Click No when it asks to check the username



6. Click your home directory, local folder, that you want the client to always open to. DO NOT edit the default remote folder, leave it blank, as your server is set up to direct you perfectly to the folder.



7. Click Finish.

8. See the site manager to the left, you should see your server in there, right click on it.

Click this bar to view the full image.



9. Click Properties.




10. Go to the "Type" Tab and you are going to be changing the protocol and port. Change the port to 990.




11. Change the protocol to "FTP with SSL (Auth. SSL --Explicit)" and click connect.




12. The client will now connect to the server.

13. Click on the Tools menu and select global options.




14. Select connections, and adjust the max transfers to 6. You can go higher, however 6 runs smoothly on most setups. If you are experiencing slow speeds, adjust this up or down and see how it effects transfer rates.



15. Select transfer now and adjust the number of parts to be download at once. The more parts, the faster the download, however as above, it will be specific to your download. I use 6.




16. You should be all set now to proceed to the download. Read below for the fastest download method.


Download

1. After you connect to your server, you will see your home directory and be all ready to just download what you want right? Yes, BUT without selecting a specific way to download, you will only be downloading 1 connection at a time. Lets take advantage of multi-part downloads.

2. On the folder you wish to download, right click and select Advanced download-->Multipart Download--->Max





3. Thats the trick. Now you will open up multiple connections to the server and decrease the transfer time by 6 times. (if you left the max connections at 6 as above).