General :: Shell Script With Java Which Check The Disk Space And Send Mail To Id?
Jun 14, 2010i want to write the script which check the disk space of linux server and send me the disk space details and mail me on my id.
View 2 Repliesi want to write the script which check the disk space of linux server and send me the disk space details and mail me on my id.
View 2 RepliesWe use a SLES 10 SP2 file server. This file server has all type of files. We want to know what is the amount of space used by mp3 files. What we need to know is the total space in disk of mp3 files. I've been testing du command, and find command, but with no satisfactory results. Does anybody know how to do this?
View 11 Replies View Relatedim looking for a program that lets me monitor server remote a check if apache is running and if its not send out a mail pretty much something like the Big Brother projeckt was before they went comercial i found a few projekts but most havent been updated for years anyone got a clue on any active projekt that does this?
View 1 Replies View RelatedCode:
df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 50G 47G 602M 99% /
How to find why Avail space shows only 602M?
[root@linux root]# fdisk -l
Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 1276 4864 28828642+ f Win95 Ext'd (LBA)
/dev/hda3 14 395 3068415 83 Linux
/dev/hda4 396 526 1052257+ 82 Linux swap
/dev/hda5 1276 3187 15358108+ 7 HPFS/NTFS
/dev/hda6 3188 3249 497983+ 8e Linux LVM
/dev/hda7 3250 3311 497983+ 8e Linux LVM
Here /dev/hda5 taken of How much capacity for NTFS (need space in MB).
When level 3, we can use only command. What can I do to check for Hard Disk usage such as used space, free space, total space.
View 4 Replies View RelatedI've just installed java (jre-6u21-linux-i586.bin) on Red Hat 4.4 AS and issued this command to check the java version: java -versionand got :bash :java: command not found
View 4 Replies View RelatedI have got a nagios server running on my network, The configuration seems to be okay but each time there is a service alert notification, and an e-mail is sent to the contact group, Nagios continuously sends e-mail over and over again. Do anyone know of a way to set Nagios directives to only send one e-mail per alert without it flooding mail boxes.
View 3 Replies View RelatedI had configured sendmail on linux 5.2, Iam using public ip and my domain is registered[linuxforfreshers.info]. I am facing a issue that when I mail with the user sumit@linuxforfreshers.info then I am able to do it. But if somebody tries to send mail to the same user then it bounce backs. I had made the entry of domain in /etc/mail/local-host-name and also I put ok in /etc/mail/access.The mails are working properly with in LAN. But not able to work on WAN only I can send mail but not able to recieve mail.What else I need to do.
View 6 Replies View RelatedHow to configure a Debian mail server as a user send a mail with attachment maximum wight is 5 Mb.
View 3 Replies View RelatedI have configured fetchmail, sendmail/postfix and mutt to act as a relay to receive mail. I can receive mail fine but I cannot send mail. Its working fine on my one box but on the one acting as a nat I am having issues. This is my mail log from the nat box.
Feb 25 03:42:25 TrunkmonkeyNat sendmail[4382]: p1P8gPfd004382: from=root, size=52, class=0, nrcpts=1, msgid=<201102250842.p1P8gPfd004382@localhost.localdomain>, relay=root@localhost
Feb 25 03:42:25 TrunkmonkeyNat sendmail[4383]: p1P8gPgn004383: from=<root@localhost.localdomain>, size=353, class=0, nrcpts=1, msgid=<201102250842.p1P8gPfd004382@localhost.localdomain>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
[Code]....
root@localhost:~ $ df /dev/sdb1
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdb1 1922858352 23247088 1801935664 2% /mnt/external/sdb1
[code]....
How to check if some folder is on a shared disk or on a local disk?
View 1 Replies View RelatedI m not able to configure sntp server at my linux distribution.
Here are the details. Defined the mail server here.
Code:
/etc/mail/sendmail.mc
dnl define(`SMART_HOST', `XXX.XX.XX.XXX')dnl
ran this command.
[Code]...
I don't understand disk sizes in Linux. I have a 500GB drive. It's ext4. I have run "tune2fs -m 0" on it to reserve the amount of space reserved for root to 0.
I'm using Ubuntu 10.04 that comes with a Disk Utility. When I run "System->Administration->Disk Utility (palimpsest)" the disk shows up as 500GB (see picture). But when I run df -h it shows up as 459GB. So, I don't understand the discrepancy.
When I run df I get the following:
Question: Why is Disk Utility showing me something different than "df"?
I use gmail for all of my emailing needs but stumbled upon linux counter at counter.li.org. Now I registered on the site and downloaded the machine-update script from the site. So I ran it and it collected the required data. But when I run ./machine-update -m as they have told, I guess no mail gets sent as I have to configure the mail program. How do I configure it so that it sends mail from my gmail address using stmp?
View 1 Replies View Relatedso I'm really new to using Linux, and I searched the forums, but most people seem to have trouble sending mail, not receiving it. When I send mail from the CLI, it gets delivered fine (from travis@travishoward.net) But when I try to reply or mail to the server, I get this message back:
Code:
----- The following addresses had permanent fatal errors ----- <travis@travishoward.net>
(reason: 554 5.7.1 <travis@travishoward.net>: Relay access denied)
[code]...
Am trying to configure the default sendmail program to send mail from command line but failed. Here are the steps I did while following [URL]
cd /etc/mail
mkdir auth
chmod 700 auth
cd authCreate a file called client-info with the following:
AuthInfo:smtp.spamarrest.com "U:<spamarrest.com's login>" "I:<spamarrest.com's login>" "P:<spamarrest.com's password>"makemap hash client-info < client-info
[Code]....
I use Evolution mail and use 2 PCs When I send mail it saves it to my current PC but not to the other PC so instead i want it to save the sent to the email server i'm using.
View 3 Replies View RelatedI have set up postfix and dovecot as per the Ubuntu anual and appear to have a functioning mail server.Using the sendmail command I can send mail and I receive mail in ~/Maildir. Using Thunderbird I can read any mails received but I can't send any mail from Thunderbird. I have tried with both STARTTLS and SSL/TLS and whilst I get the prompt for a password I keep getting the message my password for my server is wrong.I have ports 25, 465, 587 and 993. Is that all the right ports?When I ping my domain name it resolves to my router name whereas I believe it should resolve to my IP. Could there be a problem with my host file? I've had a play but to no avail.Here's the error in mail.log.
Code:
westwood@westwood-desktop:/etc$ tailf /var/log/mail.log
Jun 1 19:00:33 westwood-desktop postfix/smtpd[2376]: warning: localhost.localdomain[127.0.0.1]: SASL LOGIN
[code]....
this is my code at the moment
PHP Code: <?php
if (isset($_REQUEST['email'])) && $_REQUEST['email']!='0'{
$to = "chrisathisemail";
[code]....
i want to send mail from unix mail command to my yahoo-id with attachment, but i want to receive it as attachment.
View 1 Replies View RelatedI'm running SUSE linux Server version 11. I want to configure mail server with postfix & cyrus-imap. For that, i have read many documents in Internet by i met issues. I'm running DNS in this server & it's ok Now I cannont send mail through command line.
[Code]....
I set up my mail server using the guide here: [URL] I am able to receive mail, I can send mail locally, but I can't send to external addresses. This is in my mail.log: Quote: Jun 30 14:40:43 Server postfix/smtp[10725]: 2FD9322015BF: to=<myemail@gmail.com>, relay=none, delay=1634, delays=1484/0.02/150/0, dsn=4.4.1, status=deferred (connect to alt4.gmail-smtp-in.l.google.com[74.125.65.27]:25: Connection timed out)
This is my main.cf:
[Code]...
i have an server which have my site on it, server have an public ip and site works fine..the thing that i done to enable mail server is :
1.select sendmail option as mail server(in joomla).
2.install and configure sendmail in server (which ubuntu installed on it )
**if i use my website locally mail server works fine i can send message and receive , but when i use web site from Internet mail server seems not working at all
i basically had this system installed for our mail system.The setup is as follows:
1. Operating system installed is Debian ver. 5.0.3
2. Roundcube is installed as a webmail(if its right for me to say that)
3. The server is hosted right here at our offices
4.The server uses relay system to send mail i.e. relays all our mails to our ISP
That all i can say about the configurations becuase thats as much as i understand it.The problem now is that we are not able to send or recieve emails from both internal and external.I tried to send mail to a collegue in the office who is on our local LAN,Roundcube says sent successfully but the person does not recieve the mail.i tried to send to my yahoo address but nothing.I dont know where these mails have been trapped.
I am trying to do something really simple with Exim. I have two machine connected together via a hub. They can ping each other. They each are running openSuse 11.2 and have Exim installed. On each machine from the command line in start Exim as a daemon by typing: sudo /usr/sbin/exim -bd -d and each machine runs through some output and sits there "Listening". Then on either machine I try to send a mail message of the form mail
(or mailx) <user>@<other node>
some text
EOT
and absolutly nothing happens! I must be doing something wrong or daft which is very basic, but I have searched all over and cannot get it to work.
Was told that I need to use Javamail for a project to send mail rather than using "mail" or "mailx". Has anyone here done this?Any pointers or sites you've used and can recommend?
View 1 Replies View Relatedi'm trying to send a mail with "mail" on my cent os console , but without success. In Suse it's quite simple with "mail": mail -r sendersaddress@domain -s "subject" targetaddress@domain </tmp/filewithcontent
View 6 Replies View Relatedi've some trouble to write a script on java on linux to check if service(ie:smbd) is runing or not,, could you give me some example? Or if is there any source about it for me to learn? i've two days search with zero result...
View 5 Replies View Related