Disk space details from Unix to Outlook


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Disk space details from Unix to Outlook
# 1  
Old 09-17-2008
Disk space details from Unix to Outlook

Hi Friends,
I am using sun Solaris [SunOS 5.8].
I want to find the disk space (df -k) for the Unix box and the data has to be sent to an email id.
Can u please find me a code that checks the disk space 6 times a day, loads the data into an excel sheet and sends to an email id.
Can u also tell me how to check whether the mail sending option is enabled or not.
# 2  
Old 09-17-2008
1. You will need to create a simple script that sends df-k into a comma separated file.
Code:
df -k | awk '{print $1","$2","$3","$4","$5","$6}' > filename

2. You will need to add this script to cron - to run 6 times each day

3. To test if your host is able to send e-mail:
Code:
mailx -s test you@your.address.com

4. To mail with an attachment:
Code:
uuencode filename filename| mailx -s "subject" you@your.address.com

# 3  
Old 09-18-2008
Question

Hi

I am very new to UNIX so please forgive me if my doubts are silly.

The code u have sent is working fine.
But the problem is that I am not able to send mails through the sun solaris box.
I have tried the following code.

mailx -s test a@b.com
test mail
.
EOT


I think the problem might be that the mail server is not installed/configured.
Could you please tell me how to find out if the box is capable of sending mails or is there any other way to send mails other than mailx
Your valuable reply will be great help to me.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

DISK SPACE in UNIX

Hi, I have to regularly monitor manually if my diskspace is close to 90% or not. I use to see this by firing df -k. I want to write a script which can run 24*7 hours and would me mail me whenever the disk space is 90% or more..It would be really great if someone can helo me on this. (1 Reply)
Discussion started by: sachin4shell
1 Replies

2. Shell Programming and Scripting

Script to monitor the disk space details in HP-UX

Hi, I need to monitor the disk space details in HP-UX . I need a command on how to display the information on below format File System Total_Space_KB Used_Space_KB Available_Space_KB %Used /u05 524288000 376235344 138799427 73% /u02 ... (0 Replies)
Discussion started by: ali560045
0 Replies

3. Red Hat

storage disk details

Hi, We have a OEL5.7 installed and which has a storage attached on it. While running application it shows poor performance for Disk IO "dm-0" Now the question is how do I find what exactly is "dm-0" # iostat Linux 2.6.32-100.23.1.el5 03/10/2012 avg-cpu: %user %nice %system... (9 Replies)
Discussion started by: shrshah64
9 Replies

4. AIX

Command to get Disk Adapter details in AIX

Hi, What is the command to get the disk adapter performance details in AIX?. Guide me. (2 Replies)
Discussion started by: maruthu
2 Replies

5. Solaris

Need Hard Disk Details

Hi freinds, What is the command to find out the hard disk details (logical name, FS type etc,). Because i connected one ntfs partition and i don't know the hard disk logical and physical name to mount it.Kindly do the needful. Thanks | P.Bharathiraja. :mad: (2 Replies)
Discussion started by: bharathiraja
2 Replies

6. Filesystems, Disks and Memory

Disk space and RAM status in UNIX

I have an application which is running under AIX, HP UNIX, SCO, and LINUX(redhat and SuSE). and its dealing with some bulk amount of file handling, and some of my boxes are not very good in terms of resources like memory and disk space. so i wanted to know the statistics of each of my boxes. Like... (2 Replies)
Discussion started by: renjithram
2 Replies

7. UNIX for Dummies Questions & Answers

Details on available disk

Hi everybody.. I am looking for an alternative command to 'format' since this is allowed only to the root user. How do I do to get the same information as command format does here below ? AVAILABLE DISK SELECTIONS: 0. c0t0d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848> ... (4 Replies)
Discussion started by: Riddick61
4 Replies

8. UNIX for Dummies Questions & Answers

SCO Unix - Disk Space

Hi, I am using SCO Unix 3.12 and Informix database. When we tried to use "du -a" command to check disk space, it showed: 342122 ./usr 30092 ./etc 6244 ./dev 4778 ./bin 2674 ./tcb 1234 ./lost+found 698 ./lib 532 ./shlib 46 ./tmp 6 ./messages 4 ./opt 4 ./var 2 ./mnt 2 ./install... (1 Reply)
Discussion started by: trinhnguyen
1 Replies
Login or Register to Ask a Question