Re: [CentOS] How to schedule for a repeated task?

2010-05-01 Thread hadi motamedi
that cp command is executed on the remote system, so it will copy your
> log.cap file to /export/home on the remote system.   is that what you
> want to do?
>
>
> No, actually I wanted to copy remote node /tmp/log.cap to its /export/home.
Please correct me.
Thank you
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] How to schedule for a repeated task?

2010-05-01 Thread hadi motamedi
As others have already pointed out, this can be done with a simple
> bash script, even if you do use telnet.  I'd suggest getting a good
> bash reference and learning it, or perl for a more robust interface.
>
> Thank you for your reply. From your first message regarding using expect to
do the job , I tried to get more familiar with expect so I sent you my first
expect script to see if I have correctly understood it. Actually, my
intended expect script must be something like the followings :
#for i in 1 2 3 4 5 6 7 8 9 10
do
/usr/bin/expect
>set name 172.16.17.160
>set cmd1 "command1"
>set cmd2 "logout"
>spawn telnet $name
>send "$cmd1"
>send "$cmd2"
>exit
sleep 500
done
I want to capture the output of issuing the 'command1' on the remote node
into a text file , and also append the subsequent outputs into just one
file. As you see, the remote node accepts anonymous login so no need to
supply user id & pwd. I just need to issue the 'command1' on it and capture
the output and then wait for a prescribed time interval and then redo from
the start. Please correct me on any mis-understanding.
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Sendmail Configuration Problem - 550 5.1.1 - User unknown Problem

2010-05-01 Thread Wang, Mary Y
It's working now.  I just commented out some of the FEATURE lines in 
sendmail.mc file.
Mary


_
From:   Wang, Mary Y
Sent:   Saturday, May 01, 2010 6:21 PM
To: 'centos@centos.org'
Subject:Sendmail Configuration Problem - 550 5.1.1 - User unknown 
Problem

Hi,
I'm having this Sendmail configuration problem and stuck.  I've been doing 
googling/reading posts and none of the solutions matched my problem.
I'm doing some testing, and have been getting this 550 5.1.1 User unknown 
error when I send the email to my company's email address.   When I send it to 
an external email address, such as yahoo, the message delivered successfully.  
Of course, I'm doing the configuration behind a firewall.   I'm using a relay 
too, and I did declare the relay host in 'SMART_HOST' in the sendmail.mc file 
and have also recompiled it to produce the sendmail.cf.  I also restarted the 
sendmail service.

telnet ana.boeing.com 25
Trying 134.51.151.114...
Connected to ana.boeing.com (134.51.151.114).
Escape character is '^]'.
220 ana.boeing.com ESMTP Sendmail 8.12.11.20060308/8.12.11; Sat, 1 May 2010 
16:39:06 -0700
helo ana.boeing.com
250 ana.boeing.com Hello ana.boeing.com [134.51.151.114], pleased to meet you
mail from:r...@ana.boeing.com
250 2.1.0 r...@ana.boeing.com... Sender ok
rcpt to:mary.y.w...@boeing.com
550 5.1.1 mary.y.w...@boeing.com... User unknown

Any ideas?  I'm running on Sendmail 8.12.11

Mary



___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Upgrading to 2.6.32

2010-05-01 Thread Dag Wieers
On Sat, 1 May 2010, maillis...@gmail.com wrote:

> On Sat, May 1, 2010 at 4:37 PM, Akemi Yagi  wrote:
>
>> On Sat, May 1, 2010 at 1:28 PM,   wrote:
>>> I want to upgrade a 5.4 box with the 2.618 kernel to a shiny new 2.6.32
>>> kernel. Anyone done it? Is it possible? Are there gotcha's to watch out
>> for?
>>>
>>> Any advice is appreciated. A link to a decent howto would be awesome.
>>
>> You did not tell us why you want to run 2.6.32 on CentOS 5.4. I assume
>> you are aware of backporting and 2.6.18 is not the same as vanilla
>> kernel 2.6.18.
>>
>> Having said that, if you really, really need to run/build such a new
>> kernel, I advice you read through this CentOS forum thread in its
>> entirety:
>>
>>
>> https://www.centos.org/modules/newbb/viewtopic.php?viewmode=flat&topic_id=23627&forum=37
>>
>
> Thanks, Akemi. I really want to try the fs-cache feature to make an nfs
> caching proxy. It would be a godsend.
>
> I was wondering whether the standard "make oldconfig" would work when making
> a version jump this large.  Are my drivers likely to break?

RHEL5 actually used to ship FS-Cache as part of their 2.6.18 kernel. You 
can find an interesting article on LWN about this:

http://lwn.net/Articles/312708/

It used to be a technology preview up to 5.2, but I think it disappeared 
in the release notes of 5.3. And there is a bugzilla entry on to why:

https://bugzilla.redhat.com/show_bug.cgi?id=481579

Since FS-Cache was not mainlined, I think Red Hat ditched the idea of 
making it a supported option for the remaining 5 years of RHEL5. I guess 
testing with RHEL6 beta and then moving to CentOS 6 eventually is the 
safest option for production use.

-- 
--   dag wieers,  d...@wieers.com,  http://dag.wieers.com/   --
[Any errors in spelling, tact or fact are transmission errors]
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Sendmail Configuration Problem - 550 5.1.1 - User unknown Problem

2010-05-01 Thread Les Mikesell
Wang, Mary Y wrote:
> Hi,
> I'm having this Sendmail configuration problem and stuck.  I've been doing 
> googling/reading posts and none of the solutions matched my problem.
> I'm doing some testing, and have been getting this 550 5.1.1 User unknown 
> error when I send the email to my company's email address.   When I send it 
> to an external email address, such as yahoo, the message delivered 
> successfully.  Of course, I'm doing the configuration behind a firewall.   
> I'm using a relay too, and I did declare the relay host in 'SMART_HOST' in 
> the sendmail.mc file and have also recompiled it to produce the sendmail.cf.  
> I also restarted the sendmail service.
> 
> telnet ana.boeing.com 25
> Trying 134.51.151.114...
> Connected to ana.boeing.com (134.51.151.114).
> Escape character is '^]'.
> 220 ana.boeing.com ESMTP Sendmail 8.12.11.20060308/8.12.11; Sat, 1 May 2010 
> 16:39:06 -0700
> helo ana.boeing.com
> 250 ana.boeing.com Hello ana.boeing.com [134.51.151.114], pleased to meet you
> mail from:r...@ana.boeing.com
> 250 2.1.0 r...@ana.boeing.com... Sender ok
> rcpt to:mary.y.w...@boeing.com
> 550 5.1.1 mary.y.w...@boeing.com... User unknown
> 
> Any ideas?  I'm running on Sendmail 8.12.11
> 

Is ana.boeing.com your machine, the relay, or the target MX receiver?  Whatever 
it is, it thinks it should be able to deliver mail to boeing.com locally, but 
doesn't have a mary.y.wang user or alias.

-- 
   Les Mikesell
lesmikes...@gmail.com
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] 32-bit boot CD for 64-bit install using kickstart

2010-05-01 Thread Carlos S
I also have same kickstart files except change in url and NTP settings
(for VMware server). I will verify again if I made some silly mistake
somewhere in kickstart file. Thanks for the replies...

--
neubyr.


On Fri, Apr 30, 2010 at 8:45 PM, Robert Heller  wrote:
> At Fri, 30 Apr 2010 16:48:18 -0500 CentOS mailing list  
> wrote:
>
>>
>> Hi,
>>
>> I am using kickstart method for CentOS installation. The install is
>> done using mirror site URL and not CD/DVD ISOs. However, the system is
>> initially booted from 32-bit CentOS CD. When the install process
>> starts I get errors as:
>> - package rpm not found - abort/continue?
>> - package lvm2 not found - abort/continue?
>> - package grub not found - abort/continue?
>> - ...
>> - ...
>>
>> If I change install URL to 32-bit ISOs then everything works fine. Do
>> I need to use 64-bit boot CD for this install?
>
> Yes.
>
>
>>
>> --
>> CS.
>> ___
>> CentOS mailing list
>> CentOS@centos.org
>> http://lists.centos.org/mailman/listinfo/centos
>>
>>
>
> --
> Robert Heller             -- Get the Deepwoods Software FireFox Toolbar!
> Deepwoods Software        -- Linux Installation and Administration
> http://www.deepsoft.com/  -- Web Hosting, with CGI and Database
> hel...@deepsoft.com       -- Contract Programming: C/C++, Tcl/Tk
>
>
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] Sendmail Configuration Problem - 550 5.1.1 - User unknown Problem

2010-05-01 Thread Wang, Mary Y
Hi,
I'm having this Sendmail configuration problem and stuck.  I've been doing 
googling/reading posts and none of the solutions matched my problem.
I'm doing some testing, and have been getting this 550 5.1.1 User unknown 
error when I send the email to my company's email address.   When I send it to 
an external email address, such as yahoo, the message delivered successfully.  
Of course, I'm doing the configuration behind a firewall.   I'm using a relay 
too, and I did declare the relay host in 'SMART_HOST' in the sendmail.mc file 
and have also recompiled it to produce the sendmail.cf.  I also restarted the 
sendmail service.

telnet ana.boeing.com 25
Trying 134.51.151.114...
Connected to ana.boeing.com (134.51.151.114).
Escape character is '^]'.
220 ana.boeing.com ESMTP Sendmail 8.12.11.20060308/8.12.11; Sat, 1 May 2010 
16:39:06 -0700
helo ana.boeing.com
250 ana.boeing.com Hello ana.boeing.com [134.51.151.114], pleased to meet you
mail from:r...@ana.boeing.com
250 2.1.0 r...@ana.boeing.com... Sender ok
rcpt to:mary.y.w...@boeing.com
550 5.1.1 mary.y.w...@boeing.com... User unknown

Any ideas?  I'm running on Sendmail 8.12.11

Mary



___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Upgrading to 2.6.32

2010-05-01 Thread Brian Mathis
On Sat, May 1, 2010 at 4:40 PM,   wrote:
>
> On Sat, May 1, 2010 at 4:34 PM, Rob Kampen 
> wrote:
>>
>> maillis...@gmail.com wrote:
>>>
>>> I want to upgrade a 5.4 box with the 2.618 kernel to a shiny new 2.6.32
>>> kernel. Anyone done it? Is it possible? Are there gotcha's to watch out for?
>>
>> So why not try RHEL v6 beta?
>>>
>>> Any advice is appreciated. A link to a decent howto would be awesome.
>>>
>
> The box is about 1200 miles away and I figure I might as well give this a
> try before spending the money on remote hands. Plus my boss doesn't like the
> license stuff with Redhat.

I hope you're planning on trying this on a local test machine or a VM
specifically setup for this before trying it remotely.  Also, make
sure you have a backup plan, such as remote access to the console, and
hopefully another machine with a PXE boot to be able to reinstall the
OS or boot to a rescue disk.
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Do you provide Sendmail help?

2010-05-01 Thread Rudi Ahlers
On Sun, May 2, 2010 at 2:25 AM, Wang, Mary Y  wrote:

> Hi,
>
> Not sure if I'm on the right list.  Do you provide Sendmail configuration
> help?
>
> Thanks
> Mary
>
>
>
> ___
>
>

well, it depends on your needs :

If you're a bit more specific,then you'll get better responses
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Do you provide Sendmail help?

2010-05-01 Thread Alan McKay
>From what I have seen here, if you are running sendmail on CentOS then
most likely, as long as someone on the list can answer.

Speaking simply as a random list user


-- 
“Don't eat anything you've ever seen advertised on TV”
 - Michael Pollan, author of "In Defense of Food"
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] Do you provide Sendmail help?

2010-05-01 Thread Wang, Mary Y
Hi,

Not sure if I'm on the right list.  Do you provide Sendmail configuration help?

Thanks
Mary



___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] DNSSEC

2010-05-01 Thread Nataraj
m.r...@5-cent.us wrote:
> Well, folks,
>
>There's an article on slashdot,
> 
>
> Excerpt:
> ...the coming milestone of May 5, at 17:00 UTC --- at this time DNSSEC will
> be rolled out across all 13 root servers. Some Internet users, especially
> those inside corporations and behind smaller ISPs, may experience
> intermittent problems. The reason is that some older networking equipment
> is pre-configured to block any reply to a DNS request that exceeds 512
> bytes in size. DNSSEC replies are typically four times as large.
> --- end excerpt ---
>
> I followed the link from the story to
> , a coordinating
> organization, and tried their test (as root):
>  dig +short rs.dns-oarc.net txt
>
> And see that where I work, we're not ready. Is anyone following this,
> and/or have a HOWTO on enabling it for CentOS?
>
>  mark (need to check this at home, too)
>
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>   
Thank you for this warning. CentOS 5.4 does support this correctly, 
however I see that there are lots of ISPs out there with servers that do 
not. In an emergency you can point your systems at the free google dns, 
which appear not to support it, but according to the google technical 
staff they actually do as can be seen by the following query...
http://code.google.com/speed/public-dns/

dig @8.8.8.8 +dnssec +short rs.dns-oarc.net txt
rst.x1247.rs.dns-oarc.net.
rst.x1257.x1247.rs.dns-oarc.net.
rst.x1228.x1257.x1247.rs.dns-oarc.net.
"74.125.154.94 DNS reply size limit is at least 1257"
"74.125.154.94 sent EDNS buffer size 1280"
"Tested at 2010-05-01 23:10:20 UTC"


Nataraj


___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] How to schedule for a repeated task?

2010-05-01 Thread Jerry McAllister
On Sat, May 01, 2010 at 10:10:49AM +0100, hadi motamedi wrote:


Study up on 'vron' and 'crontab'.

jerry


> Dear All
> I need to schedule for a repeated task on my CentOS server, as the
> followings:
> -) Telnet to a remote node
> -) Issue a command
> -) Capture the output in a log
> -) Logout from Telnet
> -) Wait for a prescribed time interval
> -) Then redo , but append the subsequent output in just on file
> Can you please let me know which options do we have to write such a task?
> Thank you

> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Upgrading to 2.6.32

2010-05-01 Thread MHR
On Sat, May 1, 2010 at 1:56 PM,   wrote:
>
> That's exactly what I was wondering about. That said, I'm willing to sort
> through it all if I can just find the right docs, but I'm just inexperienced
> enough that I don't know where to start looking.
>

If this is your first time doing anything like this, it's a poor place
to start.  Building custom kernels is relatively easy if you're just
adding a module or fixing a bug, but jumping 14 versions of the kernel
to a functionally distant future from the more-than-a-year-old base
for CentOS 5.4 is a big leap, especially if you've never done that
before.  You're asking to break the system.

Speaking from experience with experiments of this nature, I'd
recommend against it.

mhr
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Upgrading to 2.6.32

2010-05-01 Thread Nataraj
maillis...@gmail.com wrote:
>
>
> On Sat, May 1, 2010 at 4:51 PM, John R. Dennison  > wrote:
>
> On Sat, May 01, 2010 at 04:44:49PM -0400, maillis...@gmail.com
>  wrote:
> >
> > I was wondering whether the standard "make oldconfig" would work
> when making
> > a version jump this large.  Are my drivers likely to break?
>
>*All* bets are off with this.  It's unsupported and for good
>reason.  Redhat has, literally, *many hundreds* of patches
> in the
>kernels they ship that the vanilla kernel kits don't provide,
>it is entirely likely hardware support is different including
>drivers.
>
>
> That's exactly what I was wondering about. That said, I'm willing to 
> sort through it all if I can just find the right docs, but I'm just 
> inexperienced enough that I don't know where to start looking.
>
> Redhat has a kernel src rpm available. Is that patched? If I started 
> with the vanilla kernel, where might I find guidance on how to apply 
> the Redhat patches? Is this a completely crazy idea?  

While I can't speak for specific features in the redhat kernel, I have 
taken the config file that comes with a CentOS kernel and applied it to 
a kernel.org kernel using make menuconfig.  I then went quickly through 
the options added in the more recent kernel and selected reasonable 
values for them.  The resulting kernel ran just fine, but, as I said I 
was not trying to use any new features added by redhat.  Note, that you 
want to build the new kernel under the CentOS release that you'll be 
running it under.  Perhaps you could apply a procedure similar to this 
using the RedHat 6 kernel instead of a kernel.org kernel (building with 
the CentOS 5.x or whatever config file and then changing the options 
that you want to change - you might have problems if you try to enable 
features not supported by older lib files).

Nataraj
> 
>
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>   

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Upgrading to 2.6.32

2010-05-01 Thread maillists0
On Sat, May 1, 2010 at 4:51 PM, John R. Dennison  wrote:

> On Sat, May 01, 2010 at 04:44:49PM -0400, maillis...@gmail.com wrote:
> >
> > I was wondering whether the standard "make oldconfig" would work when
> making
> > a version jump this large.  Are my drivers likely to break?
>
> *All* bets are off with this.  It's unsupported and for good
>reason.  Redhat has, literally, *many hundreds* of patches in the
>kernels they ship that the vanilla kernel kits don't provide,
>it is entirely likely hardware support is different including
>drivers.
>
>
> That's exactly what I was wondering about. That said, I'm willing to sort
through it all if I can just find the right docs, but I'm just inexperienced
enough that I don't know where to start looking.

Redhat has a kernel src rpm available. Is that patched? If I started with
the vanilla kernel, where might I find guidance on how to apply the Redhat
patches? Is this a completely crazy idea?
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Upgrading to 2.6.32

2010-05-01 Thread John R. Dennison
On Sat, May 01, 2010 at 04:44:49PM -0400, maillis...@gmail.com wrote:
> 
> I was wondering whether the standard "make oldconfig" would work when making
> a version jump this large.  Are my drivers likely to break?

*All* bets are off with this.  It's unsupported and for good
reason.  Redhat has, literally, *many hundreds* of patches in the
kernels they ship that the vanilla kernel kits don't provide,
it is entirely likely hardware support is different including
drivers.




John

-- 
When there are too many policemen, there can be no liberty.  When there are
too many soldiers, there can be no peace.  When there are too many lawyers,
there can be no justice.

-- Lin Yutang (10 October 1895 - 26 March 1976), Chinese writer and translator,
as quoted in Alexander, James (2005). The World's Funniest Laws. Cheam: Crombie
Jardine. pp. page 6


pgp3nlImuO3ZA.pgp
Description: PGP signature
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Upgrading to 2.6.32

2010-05-01 Thread maillists0
On Sat, May 1, 2010 at 4:37 PM, Akemi Yagi  wrote:

> On Sat, May 1, 2010 at 1:28 PM,   wrote:
> > I want to upgrade a 5.4 box with the 2.618 kernel to a shiny new 2.6.32
> > kernel. Anyone done it? Is it possible? Are there gotcha's to watch out
> for?
> >
> > Any advice is appreciated. A link to a decent howto would be awesome.
>
> You did not tell us why you want to run 2.6.32 on CentOS 5.4. I assume
> you are aware of backporting and 2.6.18 is not the same as vanilla
> kernel 2.6.18.
>
> Having said that, if you really, really need to run/build such a new
> kernel, I advice you read through this CentOS forum thread in its
> entirety:
>
>
> https://www.centos.org/modules/newbb/viewtopic.php?viewmode=flat&topic_id=23627&forum=37
>
>
Thanks, Akemi. I really want to try the fs-cache feature to make an nfs
caching proxy. It would be a godsend.

I was wondering whether the standard "make oldconfig" would work when making
a version jump this large.  Are my drivers likely to break?
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Upgrading to 2.6.32

2010-05-01 Thread maillists0
On Sat, May 1, 2010 at 4:34 PM, Rob Kampen wrote:

> maillis...@gmail.com wrote:
>
>> I want to upgrade a 5.4 box with the 2.618 kernel to a shiny new 2.6.32
>> kernel. Anyone done it? Is it possible? Are there gotcha's to watch out for?
>>
> So why not try RHEL v6 beta?
>
>>
>> Any advice is appreciated. A link to a decent howto would be awesome.
>>
>>
The box is about 1200 miles away and I figure I might as well give this a
try before spending the money on remote hands. Plus my boss doesn't like the
license stuff with Redhat.
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Upgrading to 2.6.32

2010-05-01 Thread Akemi Yagi
On Sat, May 1, 2010 at 1:28 PM,   wrote:
> I want to upgrade a 5.4 box with the 2.618 kernel to a shiny new 2.6.32
> kernel. Anyone done it? Is it possible? Are there gotcha's to watch out for?
>
> Any advice is appreciated. A link to a decent howto would be awesome.

You did not tell us why you want to run 2.6.32 on CentOS 5.4. I assume
you are aware of backporting and 2.6.18 is not the same as vanilla
kernel 2.6.18.

Having said that, if you really, really need to run/build such a new
kernel, I advice you read through this CentOS forum thread in its
entirety:

https://www.centos.org/modules/newbb/viewtopic.php?viewmode=flat&topic_id=23627&forum=37

(Note: custom kernels are not supported by CentOS)

Akemi
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Upgrading to 2.6.32

2010-05-01 Thread Rob Kampen

maillis...@gmail.com wrote:
I want to upgrade a 5.4 box with the 2.618 kernel to a shiny new 
2.6.32 kernel. Anyone done it? Is it possible? Are there gotcha's to 
watch out for?

So why not try RHEL v6 beta?


Any advice is appreciated. A link to a decent howto would be awesome.


___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
  


<>___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] Upgrading to 2.6.32

2010-05-01 Thread maillists0
I want to upgrade a 5.4 box with the 2.618 kernel to a shiny new 2.6.32
kernel. Anyone done it? Is it possible? Are there gotcha's to watch out for?

Any advice is appreciated. A link to a decent howto would be awesome.
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] How to schedule for a repeated task?

2010-05-01 Thread Kwan Lowe
On Sat, May 1, 2010 at 10:52 AM, Les Mikesell  wrote:
> hadi motamedi wrote:
>> Dear All
>> I need to schedule for a repeated task on my CentOS server, as the
>> followings:
>> -) Telnet to a remote node
>> -) Issue a command
>> -) Capture the output in a log
>> -) Logout from Telnet
>> -) Wait for a prescribed time interval
>> -) Then redo , but append the subsequent output in just on file
>> Can you please let me know which options do we have to write such a task?
>> Thank you
>
> If the remote end of this is some dumb device that can only do telnet, use
> expect, kermit, or perl's Net::Telnet module to chat with it.  If it is 
> another
> computer, set up ssh keys and just run remote commands directly.  And use cron
> to schedule the runs.

Yah, perl would be easiest:

use Net::Telnet ();
$username = "fred";
$passwd   = "fredspassword";

$server = new Net::Telnet (Timeout => 10, Prompt =>
'/\\[fre...@vm\\-helios-005 \\~\\]\\$/');
$server->open("vm-helios-005");
$server->login($username, $passwd);
@lines = $server->cmd("hostname ");
print @lines;


That's almost unchanged from the example in cpan's Net::Telnet.. :)
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] How to schedule for a repeated task?

2010-05-01 Thread John R Pierce
hadi motamedi wrote:
>
>
> if you need to automate an interactive command you can use expect
> [1][2]
>
> Thank you for your reply. I am trying like the followings:
> #expect
> >set name 172.16.17.160
> >set user id
> >set password pwd
> >set cmd1 "cd /tmp"
> >set cmd2 "cp log.cap /export/home"
> >set cmd3 "logout"
> >spawn telnet $name
> >expect "login:"
> >send "$user"
> >expect "Password:"
> >send "$password"
> >send "$cmd1"
> >send "$cmd2"
> >send "$cmd3"
> >exit

that cp command is executed on the remote system, so it will copy your 
log.cap file to /export/home on the remote system.   is that what you 
want to do?


___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] How to schedule for a repeated task?

2010-05-01 Thread MHR
On Sat, May 1, 2010 at 2:52 AM, hadi motamedi  wrote:
>
>> if you need to automate an interactive command you can use expect [1][2]
>>
> Thank you for your reply. I am trying like the followings:
> #expect
>>set name 172.16.17.160
>>set user id
>>set password pwd
>>set cmd1 "cd /tmp"
>>set cmd2 "cp log.cap /export/home"
>>set cmd3 "logout"
>>spawn telnet $name
>>expect "login:"
>>send "$user"
>>expect "Password:"
>>send "$password"
>>send "$cmd1"
>>send "$cmd2"
>>send "$cmd3"
>>exit
> I don't see any error when executing, but at the end no file is being
> copied. Can you please correct me?
> Thank you
>

Aside from the security/telnet issues, here's my take:

1) You don't need to cd to /tmp to copy a file out of it.

2) You don't verify the existence of the file before copying it.

3) You don't log what happens if the file doesn't exist.

4) I don't see anything to do the appending you mentioned in the first
email that you wanted done.

As others have already pointed out, this can be done with a simple
bash script, even if you do use telnet.  I'd suggest getting a good
bash reference and learning it, or perl for a more robust interface.

HTH

mhr
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] I need some help joining data from 3 MySQL tables, please

2010-05-01 Thread Les Mikesell
Rudi Ahlers wrote:
> 
> 
> A google search results suggested the alias should be put after the 
> bracket. So, I change the code as follow, and move the *AS `u`* outside 
> the right bracket:
> 
>  SELECT c . * , COUNT( m.id ) AS `members`
> FROM `jos_mls_teams` AS `c`
> LEFT JOIN `jos_mls_teams_members` AS `m` ON m.teamid = c.id
> RIGHT JOIN ( SELECT u.name, u.lastvisitDate FROM `jos_users` ) AS `u`
> ON u.id = m.userid
> GROUP BY c.id
> LIMIT 0 , 30 
> 
> But then I get the error:
> 
>  #1054 - Unknown column 'u.name ' in 'field list' 

Inside the subquery, the table is jos_users (and since there is only one you 
shouldn't even have to specify it.  The 'u' alias is a temporary table holding 
the result from the subquery.

-- 
   Les Mikesell
lesmikes...@gmail.com

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] How to schedule for a repeated task?

2010-05-01 Thread Athmane Madjoudj
>
> Several things are wrong with this:
>
> 1. DO NOT EVER USE TELNET.
> Seriously. Don't do this. It sends your user/pass in plain text. It's
> a horrendous security risk. I don't care what excuse you have to try
> to defend it. DO NOT DO IT. Use ssh keys instead.
>

I agree but some devices doesn't support ssh such as Routers, Embedded systems.


-- 
Athmane Madjoudj
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] How to schedule for a repeated task?

2010-05-01 Thread Les Mikesell
hadi motamedi wrote:
> Dear All
> I need to schedule for a repeated task on my CentOS server, as the 
> followings:
> -) Telnet to a remote node
> -) Issue a command
> -) Capture the output in a log
> -) Logout from Telnet
> -) Wait for a prescribed time interval
> -) Then redo , but append the subsequent output in just on file
> Can you please let me know which options do we have to write such a task?
> Thank you

If the remote end of this is some dumb device that can only do telnet, use 
expect, kermit, or perl's Net::Telnet module to chat with it.  If it is another 
computer, set up ssh keys and just run remote commands directly.  And use cron 
to schedule the runs.

-- 
   Les Mikesell
lesmikes...@gmail.com
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] I need some help joining data from 3 MySQL tables, please

2010-05-01 Thread Rudi Ahlers
Hi all,

I am trying to display collective data from 3 MySQL tables:

The query I have, so far, is
SELECT c . * , COUNT( m.id ) AS `members`
FROM `jos_mls_teams` AS `c`
LEFT JOIN `jos_mls_teams_members` AS `m` ON m.teamid = c.id
RIGHT JOIN ( SELECT u.name, u.lastvisitDate FROM `jos_users` AS `u` )
ON u.id = m.userid
GROUP BY c.id
LIMIT 0 , 30

But get the following error:

#1248 - Every derived table must have its own alias



A google search results suggested the alias should be put after the bracket.
So, I change the code as follow, and move the *AS `u`* outside the right
bracket:
 SELECT c . * , COUNT( m.id ) AS `members`
FROM `jos_mls_teams` AS `c`
LEFT JOIN `jos_mls_teams_members` AS `m` ON m.teamid = c.id
RIGHT JOIN ( SELECT u.name, u.lastvisitDate FROM `jos_users` ) AS `u`
ON u.id = m.userid
GROUP BY c.id
LIMIT 0 , 30

But then I get the error:

 #1054 - Unknown column 'u.name' in 'field list'



Basically, I need to display all the data from the "*jos_mls_teams", total
number of members linked to a user from the *"jos_mls_teams_members"
(basically counting all the rows where the corresponding user's id is in the
userid field. Then I want to display that same corresponding user's name &
email from another table.



Table structures to follow:



CREATE TABLE `jos_mls_teams` (
  `id` int(11) NOT NULL auto_increment,
  `userid` int(5) NOT NULL,
  `memberid` int(11) NOT NULL,
  `name` varchar(255) NOT NULL default '',
  `email` text,
  `area` text,
  `arealeader` varchar(150) NOT NULL,
  `founded` text,
  `herder` varchar(100) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=19 ;




CREATE TABLE IF NOT EXISTS `jos_users` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(255) NOT NULL default '',
  `username` varchar(150) NOT NULL default '',
  `email` varchar(100) NOT NULL default '',
  `password` varchar(100) NOT NULL default '',
  `usertype` varchar(25) NOT NULL default '',
  `block` tinyint(4) NOT NULL default '0',
  `sendEmail` tinyint(4) default '0',
  `gid` tinyint(3) unsigned NOT NULL default '1',
  `registerDate` datetime NOT NULL default '-00-00 00:00:00',
  `lastvisitDate` datetime NOT NULL default '-00-00 00:00:00',
  `activation` varchar(100) NOT NULL default '',
  `params` text NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `usertype` (`usertype`),
  KEY `idx_name` (`name`),
  KEY `gid_block` (`gid`,`block`),
  KEY `username` (`username`),
  KEY `email` (`email`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=73 ;



CREATE TABLE IF NOT EXISTS `jos_mls_teams_members` (
  `id` int(11) NOT NULL auto_increment,
  `teamid` int(11) NOT NULL default '0',
  `userid` int(11) NOT NULL default '0',
  `leader` tinyint(1) NOT NULL default '0',
  `sysid` int(11) NOT NULL,
  `memberid` int(11) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=29



P.S. just to be clear, I want to eventually remove the name & email fields
from the `jos_mls_teams` table, since Joomla uses the `jos_users` table for
registration purposes and it's easier to use the built-in registration than
trying to reinvent the wheel :)


-- 
Kind Regards
Rudi Ahlers
SoftDux

Website: http://www.SoftDux.com
Technical Blog: http://Blog.SoftDux.com
Office: 087 805 9573
Cell: 082 554 7532
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] how to build a centos kernel?

2010-05-01 Thread b.j. mcclure
Canonical?

http://wiki.centos.org/HowTos/Custom_Kernel

hth
B.J.
CentOS 5.4, Linux 2.6.18-164.15.1.el5 x86_64 08:58:50 up 4 days, 21:14,
1 user, load average: 1.10, 0.41, 0.19


On Sat, 2010-05-01 at 08:46 -0400, Robert P. J. Day wrote:

> a couple folks on the local mailing list were asking about the
> mechanics of building a kernel for a centos system, and they seemed to
> suggest that there were some intricacies involved as opposed to other
> distros.  i've never tried it -- is there a trick or something?  got a
> pointer to the canonical web page that has the directions?  thanks.
> 
> rday
> --
> 
> 
> Robert P. J. Day   Waterloo, Ontario, CANADA
> 
> Linux Consulting, Training and Kernel Pedantry.
> 
> Web page:  http://crashcourse.ca
> Twitter:   http://twitter.com/rpjday
> 
> ___
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] how to build a centos kernel?

2010-05-01 Thread Robert P. J. Day

  a couple folks on the local mailing list were asking about the
mechanics of building a kernel for a centos system, and they seemed to
suggest that there were some intricacies involved as opposed to other
distros.  i've never tried it -- is there a trick or something?  got a
pointer to the canonical web page that has the directions?  thanks.

rday
--


Robert P. J. Day   Waterloo, Ontario, CANADA

Linux Consulting, Training and Kernel Pedantry.

Web page:  http://crashcourse.ca
Twitter:   http://twitter.com/rpjday

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] How to schedule for a repeated task?

2010-05-01 Thread hadi motamedi
> 1. DO NOT EVER USE TELNET.
>
> 2. Use ssh keys instead of setting a password in the script.
>
> 3. You don't need to use expect to set the PWD to /tmp. You can do
> this with basic scripting. Pick up a bash scripting guide and read
> through it. I see almost nothing in your example that requires expect.
> This can be done with a simple bash script.
>
>
>
>
> Thank you for your reply. Please be informed that the remote node is a
VxWorks node that currently does not support ssh. Actually I need to telnet
to it and issue some commands and capture the output of the commands in a
file and then wait for a prescribed time interval and then redo from the
start (but I need to append all of the logs in just one file). I want to
automate this procedure. Please help me.
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] How to schedule for a repeated task?

2010-05-01 Thread Jim Perrin
On Sat, May 1, 2010 at 5:52 AM, hadi motamedi  wrote:




> Thank you for your reply. I am trying like the followings:
> #expect
>>set name 172.16.17.160
>>set user id
>>set password pwd
>>set cmd1 "cd /tmp"
>>set cmd2 "cp log.cap /export/home"
>>set cmd3 "logout"
>>spawn telnet $name
>>expect "login:"
>>send "$user"
>>expect "Password:"
>>send "$password"
>>send "$cmd1"
>>send "$cmd2"
>>send "$cmd3"
>>exit

Several things are wrong with this:

1. DO NOT EVER USE TELNET.
Seriously. Don't do this. It sends your user/pass in plain text. It's
a horrendous security risk. I don't care what excuse you have to try
to defend it. DO NOT DO IT. Use ssh keys instead.

2. Use ssh keys instead of setting a password in the script.

3. You don't need to use expect to set the PWD to /tmp. You can do
this with basic scripting. Pick up a bash scripting guide and read
through it. I see almost nothing in your example that requires expect.
This can be done with a simple bash script.




-- 
During times of universal deceit, telling the truth becomes a revolutionary act.
George Orwell
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] Request for rss feeds

2010-05-01 Thread john maclean
Who would be the right person(s) to ask for rss feeds on the main
centos website?

-- 
John Maclean
07739 171 531
MSc (DIC)

Enterprise Linux Systems Engineer
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] How to schedule for a repeated task?

2010-05-01 Thread hadi motamedi
if you need to automate an interactive command you can use expect [1][2]
>
> Thank you for your reply. I am trying like the followings:
#expect
>set name 172.16.17.160
>set user id
>set password pwd
>set cmd1 "cd /tmp"
>set cmd2 "cp log.cap /export/home"
>set cmd3 "logout"
>spawn telnet $name
>expect "login:"
>send "$user"
>expect "Password:"
>send "$password"
>send "$cmd1"
>send "$cmd2"
>send "$cmd3"
>exit
I don't see any error when executing, but at the end no file is being
copied. Can you please correct me?
Thank you
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] How to schedule for a repeated task?

2010-05-01 Thread Athmane Madjoudj
On Sat, May 1, 2010 at 10:10 AM, hadi motamedi  wrote:
> Dear All
> I need to schedule for a repeated task on my CentOS server, as the
> followings:
> -) Telnet to a remote node
> -) Issue a command
> -) Capture the output in a log
> -) Logout from Telnet
> -) Wait for a prescribed time interval
> -) Then redo , but append the subsequent output in just on file
> Can you please let me know which options do we have to write such a task?
> Thank you

Use cron to schedule the tasks.

if you need to automate an interactive command you can use expect [1][2]

[1] http://expect.nist.gov/
[2] http://en.wikipedia.org/wiki/Expect


HTH

-- 
Athmane Madjoudj
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] How to schedule for a repeated task?

2010-05-01 Thread hadi motamedi
Dear All
I need to schedule for a repeated task on my CentOS server, as the
followings:
-) Telnet to a remote node
-) Issue a command
-) Capture the output in a log
-) Logout from Telnet
-) Wait for a prescribed time interval
-) Then redo , but append the subsequent output in just on file
Can you please let me know which options do we have to write such a task?
Thank you
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos