cancel
Showing results for 
Search instead for 
Did you mean: 

Error in lseek and ioctl

SOLVED
Go to solution
laiju.c.babu
Regular Advisor

Error in lseek and ioctl

Hi Team,

In our scenario we have 200+ linux servers. We are collecting the logs from all these  200+ linux servers to one hpunix machine. We are doing this activity using crontab and enabled passwordless ssh from  hpunix machine to all these linux servers so that we can do scp.

 

But for some of those machines we are not able  collect logs . I installed tusc and tracked the process, I got below errors from the tusc  output for some linux machines

 

lseek(3, 0, SEEK_CUR) .................................................................................................................. ERR#29 ESPIPE
ioctl(3, TCGETATTR, 0x40003960) ........................................................................................................ ERR#25 ENOTTY

 

I am able to do passwordless ssh to these linux servers and able to copy those logs manually using scp also. Could you please help me  out on this.

 

Regards

Laiju.C.Babu
16 REPLIES
Dennis Handly
Acclaimed Contributor

Re: Problems with crontab and scp

These are not the droids you seek.  I assume these errors are ignored and it continues.

 

What file is opened for FD 3?  Also what syscalls happens after them?

 

Are you using tusc on scp on HP-UX?

laiju.c.babu
Regular Advisor

Re: Error in lseek and ioctl

Hi Dennis,

 

I am attaching the full system calls genrated for one server .

 

We have one script fo collecting logs from all other server (Linux+ Hpunix) We put this script in crontab . What i did  traced the process id of that script using tusc.

 

 

Laiju.C.Babu
Laurent Menase
Honored Contributor

Re: Error in lseek and ioctl

you should use -p -f options of tusc

Dennis Handly
Acclaimed Contributor

Re: Problems with crontab and scp

>I am attaching the full system calls generated for one server.


This isn't full.  And as I said, these syscall errors at the start can be ignored.

 

>you should use -p -f options of tusc

 

Also -ea to trace execv call parms.

laiju.c.babu
Regular Advisor

Re: Error in lseek and ioctl

Hi Dennis,

 

Thanks for the reply.

 

can i use the below syntax

 

tusc -p -f -ea <pid>

 

Regards

Laiju.C.Babu
Laurent Menase
Honored Contributor

Re: Error in lseek and ioctl

tusc -pfea -o /tmp/resultfile  command

or

tusc -pfea -o /tmp/resultfile  pid
or

 

tusc -pfea -o /tmp/resultfile  $$   &

scp command &

kill tusc when error is seen

 

-p -f -e -a is the same as -pfea

 

Dennis Handly
Acclaimed Contributor

Re: Problems with crontab and scp

>can I use the below syntax

 

Yes.  I clump -ea together in case I want less output and want to remove both.

But for -fp, I always combine and use.

laiju.c.babu
Regular Advisor

Re: Error in lseek and ioctl

I got the below output from the tusc

 

( Attached to process 650 ("sh -c     /eytools/eybin/get_linuxinfo.sh 1>/dev/null 2>&1") [32-bit] )
[650] waitpid(-1, 0x7fffe810, WUNTRACED) ............................................................................................... [sleeping]
[650] waitpid(-1, WIFEXITED(0), WUNTRACED) ............................................................................................. = 654
[650] sigvector(SIGCLD, 0x7fffe7e0, 0x7fffe7f0) ........................................................................................ = 0
[650] sigprocmask(SIG_SETMASK, 0x7fffe830, 0x7fffe850) ................................................................................. = 0
[650] sigprocmask(SIG_SETMASK, 0x7fffe850, 0x7fffe830) ................................................................................. = 0
[650] sigprocmask(SIG_SETMASK, 0x7fffe830, 0x7fffe850) ................................................................................. = 0
[650] sigprocmask(SIG_SETMASK, 0x7fffe850, 0x7fffe830) ................................................................................. = 0
[650] sigprocmask(SIG_SETMASK, 0x7fffe830, 0x7fffe850) ................................................................................. = 0
[650] sigprocmask(SIG_SETMASK, 0x7fffe850, 0x7fffe830) ................................................................................. = 0
[650] sigprocmask(SIG_SETMASK, 0x7fffe830, 0x7fffe850) ................................................................................. = 0
[650] sigprocmask(SIG_SETMASK, 0x7fffe850, 0x7fffe830) ................................................................................. = 0
[650] sigprocmask(SIG_SETMASK, 0x7fffe830, 0x7fffe850) ................................................................................. = 0
[650] sigprocmask(SIG_SETMASK, 0x7fffe850, 0x7fffe830) ................................................................................. = 0
[650] sigprocmask(SIG_SETMASK, 0x7fffe830, 0x7fffe850) ................................................................................. = 0
[650] sigprocmask(SIG_SETMASK, 0x7fffe850, 0x7fffe830) ................................................................................. = 0
[650] sigprocmask(SIG_SETMASK, 0x7fffe830, 0x7fffe850) ................................................................................. = 0
[650] sigprocmask(SIG_SETMASK, 0x7fffe850, 0x7fffe830) ................................................................................. = 0
[650] sigprocmask(SIG_SETMASK, 0x7fffe830, 0x7fffe850) ................................................................................. = 0
[650] sigprocmask(SIG_SETMASK, 0x7fffe850, 0x7fffe830) ................................................................................. = 0
[650] sigprocmask(SIG_SETMASK, 0x7fffe830, 0x7fffe850) ................................................................................. = 0
[650] sigprocmask(SIG_SETMASK, 0x7fffe850, 0x7fffe830) ................................................................................. = 0
[650] sigprocmask(SIG_SETMASK, 0x7fffe830, 0x7fffe850) ................................................................................. = 0
[650] sigprocmask(SIG_SETMASK, 0x7fffe850, 0x7fffe830) ................................................................................. = 0
[650] sigprocmask(SIG_SETMASK, 0x7fffe830, 0x7fffe850) ................................................................................. = 0
[650] sigprocmask(SIG_SETMASK, 0x7fffe850, 0x7fffe830) ................................................................................. = 0
[650] exit(0) .......................................................................................................................... WIFEXITED(0)

Laiju.C.Babu
Dennis Handly
Acclaimed Contributor

Re: Problems with crontab and scp

>I got the below output from the tusc

 

Nothing useful there.  How did you collect tusc info the first vs this time?

laiju.c.babu
Regular Advisor

Re: Error in lseek and ioctl

Hi Dennis,

 

I used the below command

 

tusc -pfea -o /tmp/resultfile  pid

 

If you didnt get any good infromation from this , i will do it once more and post .

 

Regards

 

Laiju.C.Babu
Dennis Handly
Acclaimed Contributor

Re: Problems with crontab and scp

>tusc -pfea -o /tmp/resultfile pid

 

It appears you did this after that PID forked the process that does the real work?

Can you get a ps(1) output of that PID and its child, so you can make sure you are tracing the right process.

 

Or if this is done on a continual basis, trace the parent of PID and that will eventually have some useful data.

Laurent Menase
Honored Contributor

Re: Error in lseek and ioctl

can you add set -x at the begining of your script

  /eytools/eybin/get_linuxinfo.sh

laiju.c.babu
Regular Advisor

Re: Error in lseek and ioctl

Hi Dennis,

 

Parent PID of this process is crond , can i track with the PID of cron.

 

Regards

 

Laiju.C.Babu
Dennis Handly
Acclaimed Contributor

Re: Problems with crontab and scp

>can I track with the PID of cron?

 

Yes but it may give too much if there are other activities.

You could replace your crontab entry with a script that invokes tusc on your real script.

laiju.c.babu
Regular Advisor

Re: Problems with crontab and scp

Hi,

 

I am attaching the output of tusc . Could you please check the output for the server ussecavldnaut1. This is one of the server which i am facing issue.

 

Laiju.C.Babu
laiju.c.babu
Regular Advisor
Solution

Re: Problems with crontab and scp

Hi  Team,

 

Thanks a lot for the help.  The issue is resolved . The problem was with the time zone . The main servers was on GMT and the clients having EDT.  So i just changed  execution time of script in crontab. Now its working fine . Thanks a lot for your help.

 

Regards

 

Laiju.C.Babu