Unix/Linux Go Back    


Android Brand new forum for folks interesting in Linux and Java-based Android OS and multi-platform mobile computing in general.

Strace help

Android


Closed    
 
Thread Tools Search this Thread Display Modes
    #15  
Old Unix and Linux 02-18-2013
far001han far001han is offline
Registered User
 
Join Date: Feb 2013
Last Activity: 18 February 2013, 3:03 PM EST
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
have a look at this Linux
Sponsored Links
    #16  
Old Unix and Linux 02-18-2013
DGPickett DGPickett is offline Forum Advisor  
Registered User
 
Join Date: Oct 2010
Last Activity: 1 February 2016, 3:35 PM EST
Location: Southern NJ, USA (Nord)
Posts: 4,673
Thanks: 8
Thanked 587 Times in 560 Posts
Try something simple like "strace -fvxs9999 -o /tmp/date.tr ksh -c date"
Sponsored Links
    #17  
Old Unix and Linux 02-18-2013
far001han far001han is offline
Registered User
 
Join Date: Feb 2013
Last Activity: 18 February 2013, 3:03 PM EST
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by DGPickett View Post
Try something simple like "strace -fvxs9999 -o /tmp/date.tr ksh -c date"
ksh command not found. I got this error . and i have tried strace works on ls, cat here.

---------- Post updated at 02:10 PM ---------- Previous update was at 02:07 PM ----------

everything works perfect if i give a pid,

but what i want is , automate the process. so it should be i will start the application in emulator , but internally it should get the pid of application and give it to strace and start logging
    #18  
Old Unix and Linux 02-18-2013
DGPickett DGPickett is offline Forum Advisor  
Registered User
 
Join Date: Oct 2010
Last Activity: 1 February 2016, 3:35 PM EST
Location: Southern NJ, USA (Nord)
Posts: 4,673
Thanks: 8
Thanked 587 Times in 560 Posts
make it sh.

Replace the app with an executable sh script that does a strace of every call, logging to a separate file with date time pid to be unique.
Sponsored Links
    #19  
Old Unix and Linux 02-18-2013
far001han far001han is offline
Registered User
 
Join Date: Feb 2013
Last Activity: 18 February 2013, 3:03 PM EST
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by DGPickett View Post
make it sh.
it outputs date. for stanard command like date , ls ,cat it works fine

everything works perfect if i give a pid,

but what i want is , automate the process. so it should be i will start the application in emulator , but internally it should get the pid of application and give it to strace and start logging

---------- Post updated at 02:19 PM ---------- Previous update was at 02:12 PM ----------

Quote:
Originally Posted by DGPickett View Post
make it sh.

Replace the app with an executable sh script that does a strace of every call, logging to a separate file with date time pid to be unique.
I am new to linux. Can u show me and example for sh script , it would be of real help

Last edited by far001han; 02-18-2013 at 02:12 PM.. Reason: mistake spell
Sponsored Links
    #20  
Old Unix and Linux 02-18-2013
DGPickett DGPickett is offline Forum Advisor  
Registered User
 
Join Date: Oct 2010
Last Activity: 1 February 2016, 3:35 PM EST
Location: Southern NJ, USA (Nord)
Posts: 4,673
Thanks: 8
Thanked 587 Times in 560 Posts
To be executable, a script must have the execution permission bit set for the intended audience, it must have a #!full_path_to_interpreter_is_sh as the first line (optionally with one argument; for awk and sed you need -f), and off you go. It's in the execvp() man page.
Sponsored Links
    #21  
Old Unix and Linux 02-18-2013
far001han far001han is offline
Registered User
 
Join Date: Feb 2013
Last Activity: 18 February 2013, 3:03 PM EST
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by DGPickett View Post
To be executable, a script must have the execution permission bit set for the intended audience, it must have a #!full_path_to_interpreter_is_sh as the first line (optionally with one argument; for awk and sed you need -f), and off you go. It's in the execvp() man page.
Thank you very much will try out
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Need help on strace output klng UNIX for Advanced & Expert Users 4 10-21-2012 08:55 PM
strace big123456 UNIX for Advanced & Expert Users 6 10-10-2011 06:59 AM
ioctl : strace angad.makkar UNIX for Advanced & Expert Users 1 03-12-2009 10:03 AM
strace p4cldba UNIX for Advanced & Expert Users 0 07-11-2008 12:31 PM
help running strace klam UNIX for Advanced & Expert Users 4 09-25-2006 10:06 AM



All times are GMT -4. The time now is 12:01 PM.