Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

how to find a device in solaris 2.6?

Posted on 1999-07-06
8
Medium Priority
?
288 Views
Last Modified: 2013-12-27
I have a problem in solaris 2.6 . I have to check whether a device and a media associated with that device exist in the system. I have to check for CD-ROM, floppy, Tape, Raid, N/W card. We have tried using Volmgt_xxx() but they are working well for floppy. For others what should I do????
0
Comment
Question by:jituj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 2

Expert Comment

by:khaled022498
ID: 2011354
i think the best command to use is ( prtconf ), the output from this command can be filtered to match your needs ( by using grep), this command will give you all the attached drivers which is loaded and the unloaded drivers.

i hope it helps you.

0
 

Author Comment

by:jituj
ID: 2011355
Hi Khaled,
    We are already using this command but it gives the node and the instance of the device. I want to correlate this data with the device name. Well the purpose of asking the question is when I run my application in any other machine I am supposed to detect all the devices connected to the system and their names.
    For this it will of great help if I could get the names of the devices. Currently with the command I am unable to get the name of the device. I also want to have more info. Thanks for the help. Can you provide me more help????
    Out of interest I am asking "Is there any possibility of getting the size of the hard disk from the system without actually performing a read operation?"
0
 

Author Comment

by:jituj
ID: 2011356
Hi Khaled,
    We are already using this command but it gives the node and the instance of the device. I want to correlate this data with the device name. Well the purpose of asking the question is when I run my application in any other machine I am supposed to detect all the devices connected to the system and their names.
    For this it will of great help if I could get the names of the devices. Currently with the command I am unable to get the name of the device. I also want to have more info. Thanks for the help. Can you provide me more help????
    Out of interest I am asking "Is there any possibility of getting the size of the hard disk from the system without actually performing a read operation?"
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 3

Expert Comment

by:brauner071697
ID: 2011357
Hi Jituj,

look at the command dmesg it shows you several messages at boot time, so you can grep for Disk, NIC, RAID, Tape,CPU, MEM and whatever you want.

regards

GB
0
 

Author Comment

by:jituj
ID: 2011358
Hi Brauner,
    The command is helpful to me. What exactly I am looking for is a system call that can directly give me the answer. In the case of "dmesg" i will have to redirect the output of the command to a file and then parse it. It will take time as well as put more load on the system. I want to reduce this.
    Moreover the command does not give me full information about all the devices in the system. It give the info of CDROM, memory, cpu, N/W card. It does not give the info about floppy and hard disk, RAID, tape.
   Please can u give me more info.
Bye,
 Jitu.
0
 
LVL 3

Expert Comment

by:brauner071697
ID: 2011359
Hi Jituj,

the dmesg command gives you info about hard disk, RAID, tape also.
It depends on your special driver for that, so for the AMI megaraid the drivers calls mega.
If you want special info try the modinfo command.
As far as I know this commands are the only commands to look at your  drivers.
regards
GB
0
 

Author Comment

by:jituj
ID: 2011360
Hi Brauner,
    I will reject this answer now as giving an answer will block other users from entering there views and comments. I actually am looking for some system call and not commands. If i don't get any more comments then i will evaluate your answer.
regards,
   jituj
0
 

Accepted Solution

by:
sunfire earned 40 total points
ID: 2011361
jituj:

The file "/etc/path_to_inst" will give you that information.

-sunfire
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question