prtdiag command works only from commandline manually


 
Thread Tools Search this Thread
Operating Systems Solaris prtdiag command works only from commandline manually
# 1  
Old 10-08-2012
prtdiag command works only from commandline manually

When i run the command sudo /usr/sbin/prtdiag manually on a solaris 10 box, it works as expected.
But the same command from my java code gives me the following error. picl_initialize failed: Daemon not responding.

I am unable to figure out why is not running from my code.Smilie
# 2  
Old 10-08-2012
First off, prtdiag does not normally need special privileges to be run. A sysadmin can make prtdiag not available. So the first question is what do you get from the command line:
Code:
ls -l /usr/sbin/prtdiag

Can you run prtdiag without sudo?

next question - when java runs what user is executing the code?
# 3  
Old 10-08-2012
Sounds like the picl service is not running for some reason. To check:
Code:
# svcs -a | grep picl

To start picl
Code:
# svcadm enable svc:/system/picl:default

# 4  
Old 10-09-2012
@jim mcnamara.
In the java code i have tried using both sudo and root user, both give me the same error.
@fpmurphy, the picl service is running, i even tried restarting it, but its still the same.Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

"Mv" command does not work in loop, but works manually

Hi there, this may be a beginner's error, but I've been unable to find a solution on my own and by googling, and now I am really stuck on it. I am simply trying to move directories called for example CAT_Run01.ica to a directory with the corresponding number, Run01, in the same directory. For... (2 Replies)
Discussion started by: andrevol
2 Replies

2. UNIX for Dummies Questions & Answers

Execution problem with Cron: Script works manually but not w/Cron. Why?

Hello gurus, I am making what I think is a simple db2 call from within a shell script but I am having difficulty producing the desired report when I run the script shown below from a shell script in cron. For example, my script and the crontab file setup is shown below: #!/bin/ksh db2... (3 Replies)
Discussion started by: okonita
3 Replies

3. Shell Programming and Scripting

Calling bash script works when called manually but not via Cron?

Hi, I've got a Bash backup script I'm trying to run on a directory via a cron job nightly. If I ssh in and run the script manually it works flawlessly. If I set up the cron to run evertything is totally messed up I don't even know where to begin. Basically the path structure is ... (6 Replies)
Discussion started by: wyclef
6 Replies

4. UNIX for Advanced & Expert Users

While trying to load .so file manually using command its failing

Hi all, I am newbie to linux environment. I was trying to run an .so file manually which in turn call a method in bin folder. Command given, XXX_MODULES=libxxx.so /opt/servicename/bin/methodname -Le -c /opt/servicename/etc/methodname/methodname.conf -n -C -t -m "" When i tried to execute... (1 Reply)
Discussion started by: sharathpadman
1 Replies

5. UNIX for Dummies Questions & Answers

While trying to load .so file manually using command its failing

Hi all, I am newbie to linux environment. I was trying to run an .so file manually which in turn call a method in bin folder. Command given, XXX_MODULES=libxxx.so /opt/servicename/bin/methodname -Le -c /opt/servicename/etc/methodname/methodname.conf -n -C -t -m "" When i tried to... (1 Reply)
Discussion started by: sharathpadman
1 Replies

6. Shell Programming and Scripting

Why my git command has no output in crontab but works well run this script manually?

cat /home/lyang001/update.sh #!/bin/sh #shopt -s expand_aliases HOME_DIR=/home/lyang001/updates UPDATE_MAIL=${HOME_DIR}/updates.mail rm $UPDATE_MAIL -rf cd $HOME_DIR/wr-kernel git log --no-merges --since="20 day ago" --name-status --pretty=format:"%an %h %s %cd" origin/WRLINUX_5_0_1_HEAD >>... (2 Replies)
Discussion started by: yanglei_fage
2 Replies

7. Shell Programming and Scripting

SH script, variable built command fails, but works at command line

I am working with a sh script on a solaris 9 zone (sol 10 host) that grabs information to build the configuration command line. the variables Build64, SSLopt, CONFIGopt, and CC are populated in the script. the script includes CC=`which gcc` CONFIGopt=' --prefix=/ --exec-prefix=/usr... (8 Replies)
Discussion started by: oly_r
8 Replies

8. Shell Programming and Scripting

Effect of using eval to execute a command as opposed to writing it on the commandline

cmd='date | wc' or cmd="date | wc" $cmdIf this script is executed, an error is generated. The reason written was that "The execution fails because the pipe is not expanded and is passed to date as an argument". What is meant by expansion of pipe. When we execute date | wc on the command line, it... (2 Replies)
Discussion started by: daudiam
2 Replies

9. UNIX for Dummies Questions & Answers

Works Manually - not in CRON

I've got a ksh script that works like a charm when I run it manually. When I set it up in a cron, I keep getting this error in my log: syntax error at line 90: `$' unexpected Here's my snippet of code starting at line 90: while ] do sleep 900 done What's the... (5 Replies)
Discussion started by: dstinsman
5 Replies

10. Solaris

equivalent prtdiag and prtconf command

I have a very old sunOS 4.xx server on a SPARCstation 5. What is the command , if any, that is similar to prtdiag and prtconf? Thanks (4 Replies)
Discussion started by: antalexi
4 Replies
Login or Register to Ask a Question