Need guidance on using ddi_regs_map_setup solaris system call

Hi all,
Am a beginner in using Sun Solaris.
I am working on porting our source code from linux to solaris.
In Linux we are using inb/outb to read/write to keyboard data port(0x60) .
I know that there is an equivalent system call for inb/outb in solaris. But in man page(of sun os) it is mentioned that inb/ outb are obsolete. It was mentioned that we can use ddi_get8/ddi_put8 functions respectively.
ddi_get8 call requires ddi_acc_handle_t as a parameter which we can get it from ddi_regs_map_setup system call.
Syntax for this call is:
int ddi_regs_map_setup(dev_info_t *dip, uint_t rnumber,
caddr_t *addrp, offset_t offset, offset_t len,
ddi_device_acc_attr_t accattrp, ddi_acc_handle_t handlep);
Please let me know where does the 0x60 port number fits in the above system call and what does these parameters rnumber, offset, len corresponds to ?

Hi,
The Fault_PC 0x13575e8 tells you exactly where you
die. I assume you have used this in mdb on
the core file to find you are dying in the ddi_get8 call?
Are you checking return value of ddi_regs_map_setup?
Are you sure the register you are accessing is in register set 1?
Are there other places prior to the panic where
the ddi_get/ddi_put routines work correctly? A bus error
here generally means the location you are trying to access
does not exist on the device. (It could also be alignment,
but not with ddi_get8). The address
looks like 1fe.02001400, which looks like a possibly
valid address in I/O space.
I would print the value of wc->ioaddr to make sure
it is a valid virtual address.
Hi,
I'm in the middle of porting a device driver for a
PCI card from linux to solaris (it's wcfxo from
zaptel - part of asterisk).
>
WARNING: [AFT1] Bus Error on System Bus in privileged
mode from CPU0 Data access at TL=0, errID
0x0000000b.985ccf88
AFSR 0x00000000.84000000<PRIV,BERR> AFAR
AFAR 0x000001fe.02001400
AFSR.PSYND 0x0000(Score 05) AFSR.ETS 0x00
0x00 Fault_PC 0x13575e8
UDBH 0x0000 UDBH.ESYND 0x00 UDBL 0x0000
0000 UDBL.ESYND 0x00
panic[cpu0]/thread=2a10007dd40: [AFT1] errID
0x0000000b.985ccf88 BERR Error(s)
See previous message(s) for detailsThe actual code which seems to cause the panic is:
#define inb(a)          ddi_get8(wc->devhandle, a)
ints = inb(wc->ioaddr + WC_INTSTAT);where there initialisation includes:
static struct ddi_device_acc_attr dev_attr = {
DDI_DEVICE_ATTR_V0,
DDI_STRUCTURE_LE_ACC,
DDI_STRICTORDER_ACC
ddi_regs_map_setup(wc->dip, 1, &wc->ioaddr, 0, 255,
&dev_attr,
&dev_attr, &wc->devhandle);I've tested the same card in a linux x86 box, and it
works fine, so I'm happy it's not a hardware
problem.
Any suggestions on what might be causing this?
Thanks,
Simon

Similar Messages

  • Issuing Solaris system calls through Java

    How can I issue a system call to Solaris using Java? (i.e. Start a script, open a file, and similar)

    Hi Srini,
    This is just a suggestion, but try entering the following commands (in your SQL*Plus session) before executing your stored procedure:
    set serveroutput on size 1000000
    exec dbms_java.set_output(1000000)Hope this helps.
    Good Luck,
    Avi.

  • Shutting service down via subscribed event using TMIB or system call

    I have a client that performs a tppost of a database event(in this case a oracle RAC FAN event indicating a down node). I created another server that subscribes to this event. At this point I have had issues. From the server I am unable to perform a system call of tmshutdown and tmboot.
    It performs the tmshutdown but not the tmboot. When i do the same thing from a client I have no issues. Is there something unique about the tuxedo server main preventing me from doing a system call effectively? The TMIB calls appear to work ok also but do nto restart the server. If someone has an idea thanks.
    I then tried to perform the activity via TMIB calls but also had not luck:
    void DBSTATECHGSERV(TPSVCINFO *svcinfo)
    char charBuf[2000];
    FBFR32 *fbfr;
    FLDLEN32 len;
    char *pEventName = NULL;
    int i=0;
    FBFR32 ibuf = (FBFR32 )tpalloc((char *)FMLTYPE32, NULL, 0);
    Fchg32(ibuf, TA_OPERATION, 0,(char*) "SET", 0);
    Fchg32(ibuf, TA_CLASS, 0,(char*) "T_SERVER", 0);
    Fchg32(ibuf, TA_GRPNO, 0, (char *)"1", 0);
    Fchg32(ibuf, TA_SERVERNAME, 0, (char *)"ECHO", 0);
    Fchg32(ibuf, TA_SRVID, 0, (char *)"10", 0);
    Fchg32(ibuf, TA_STATE, 0, (char *)"DEA", 0);
    int retc = tpcall((char *)".TMIB", (char *)ibuf, 0, (char **)&ibuf, &len, (l
    ong)0);
    //int retc = tpadmcall(ibuf, &ibuf, 0);
    if ( retc < 0)
    printf("tpadmcall() failed:%s\n",tpstrerror(tperrno));
    Fchg32(ibuf, TA_OPERATION, 0,(char*) "SET", 0);
    Fchg32(ibuf, TA_CLASS, 0,(char*) "T_SERVER", 0);
    Fchg32(ibuf, TA_GRPNO, 0, (char *)"1", 0);
    Fchg32(ibuf, TA_SERVERNAME, 0, (char *)"ECHO", 0);
    Fchg32(ibuf, TA_SRVID, 0, (char *)"10", 0);
    Fchg32(ibuf, TA_STATE, 0, (char *)"ACT", 0);
    retc = tpcall((char *)".TMIB", (char *)ibuf, 0, (char **)&ibuf, &len, (long)
    0);
    //int retc = tpadmcall(ibuf, &ibuf, 0);
    if ( retc < 0)
    printf("tpadmcall() failed:%s\n",tpstrerror(tperrno));
    tpfree((char *)ibuf);
    userlog("got the subscription ");
    execl("/home/hems/prod/getit.sh","","getit.sh", NULL);
    i = system("getit.sh ");
    userlog("return value from system call %d ",i);
    //i = system("tmboot -yg -yg TESTGRP_1 ");
    //userlog("return value from system call %d ",i);
    tpreturn(TPSUCCESS, 0, NULL, 0, 0);

    I did what you mention yesterday and came up with the following:
    #/bin/ksh
    export FIELDTBLS32=tpadm,Usysfl32,evt_mib,tpadm
    export FLDTBLDIR32=${TUXDIR}/udataobj
    ud32 -C tpsysadm < ud32dead.txt
    ud32 -C tpsysadm < ud32active.txt
    Contents of ud32dead.txt:
    SRVCNM .TMIB
    TA_FLAGS 65536
    TA_OPERATION SET
    TA_CLASS T_SERVER
    TA_GRPNO 1
    TA_SRVID 10
    TA_STATE DEAD
    Contents of ud32aCTIVE.TXT:
    SRVCNM .TMIB
    TA_FLAGS 65536
    TA_OPERATION SET
    TA_CLASS T_SERVER
    TA_GRPNO 1
    TA_SRVID 10
    TA_STATE ACTIVE
    This works like a champ. I then added this as a system call to the server program and it also worked. This may prove to actually be a more flexible way to accomplish this but still wanted to understand what is wrong with what I am doing in the server. I was able to set the domain to protected via this code and an example you worked with on another person:
    Fchg32(ibuf, TA_OPERATION, 0,(char*) "SET", 0);
    Fchg32(ibuf, TA_CLASS, 0, (char *)"T_DOMAIN", 0);
    Fchg32(ibuf, TA_SYSTEM_ACCESS, 0, (char *)"PROTECTED", 0);
    int retc = tpcall((char *)".TMIB", (char *)ibuf, 0, (char **)&ibuf, &len, (long)0);
    userlog("value of retc %d",retc);
    if ( retc < 0)
    userlog("tpadmcall() failed:%s",tpstrerror(tperrno));
    So I think my security is correct. When I try the folllowing code I receive an error
    int tpsvrinit(int argc, char **argv)
    TPEVCTL ctl;
    int found = 0;
    int i = 0;
    TPINIT * tpinfo = (TPINIT*)tpalloc((char *)"TPINIT",NULL,TPINITNEED(20));
    strcpy(tpinfo->grpname,"dba");
    strcpy(tpinfo->usrname, "tuxedo");
    strcpy(tpinfo->cltname, "tpsysadm");
    strcpy(tpinfo->passwd,"XXXXX#");
    // tpinfo->flags = TPSA_FASTPATH;
    userlog("the logging feature associated with DB waits is set to %s",logWaits);
    ctl.flags = TPEVSERVICE;
    strcpy(ctl.name1, "DBSTATECHGSERV");
    strcpy(ctl.name2, "");
    if ((subscribeHandle = tpsubscribe("DB_STATE_CHG", "", &ctl, 0)) == -1)
    if (tperrno != TPEMATCH)
    /* Could not subscribe so just get out without starting since we can't do anything */
    userlog("Could not subscribe, tperrno = '%s'", tpstrerror(tperrno));
    return -1;
    userlog("Started Service %s", DBSTATESERVX);
    return 0;
    void tpsvrdone(void)
    /* Clean up subscription before exiting */
    if (subscribeHandle != 0 && subscribeHandle != -1)
    tpunsubscribe(subscribeHandle, 0);
    /* Service Entry Point for subscription */
    void DBSTATECHGSERV(TPSVCINFO *svcinfo)
    char charBuf[2000];
    FBFR32 *fbfr;
    FLDLEN32 len=1024;
    char *pEventName = NULL;
    int i=0;
    long srvid=10;
    long grpno=1;
    userlog("got there");
    FBFR32 ibuf = (FBFR32 )tpalloc((char *)FMLTYPE32, NULL, len);
    //Fchg32(ibuf, TA_FLAGS, 0,(char*) "65536", 0);
    Fchg32(ibuf, TA_OPERATION, 0,(char*) "SET", 0);
    Fchg32(ibuf, TA_CLASS, 0,(char*) "T_SERVER", 0);
    Fchg32(ibuf, TA_GRPNO, 0, (char *)"1", 0);
    Fchg32(ibuf, TA_SRVID, 0, (char *)"10", 0);
    Fchg32(ibuf, TA_STATE, 0, (char *)"DEAD", 0);
    //Fchg32(ibuf, TA_SRVGRP, 0,(char*) "TESTGRP_1", 0);
    //Fchg32(ibuf, TA_SERVERNAME, 0, (char *)"ECHO", 0);
    //Fchg32(ibuf, TA_LMID, 0, (char *)"CWSFEP1", 0);
    //Fchg32(ibuf, TA_PID, 0, (char *)"9094", 0);
    //Fchg32(ibuf, TA_OPERATION, 0,(char*) "SET", 0);
    //chg32(ibuf, TA_CLASS, 0, (char *)"T_DOMAIN", 0);
    //Fchg32(ibuf, TA_SYSTEM_ACCESS, 0, (char *)"PROTECTED", 0);
    int retc = tpcall((char *)".TMIB", (char *)ibuf, 0, (char **)&ibuf, &len, (long)0);
    userlog("value of retc %d",retc);
    if ( retc < 0)
    userlog("tpadmcall() failed:%s",tpstrerror(tperrno));
    // userlog("past call to set svr to dead");
    This is the userlog output from the above.
    152234.CWSFEP1!DBSTATECHGSERV.4488: TRACE:at: { tpservice({"DBSTATECHGSERV", 0x4, 0x0, 0, 0, -1, {1279653754, 0, 1000}})
    152234.CWSFEP1!DBSTATECHGSERV.4488: got there
    152234.CWSFEP1!DBSTATECHGSERV.4488: TRACE:at: { tpalloc("FML32", "", 1024)
    152234.CWSFEP1!DBSTATECHGSERV.4488: TRACE:at: } tpalloc = 0x4001aea0
    152234.CWSFEP1!DBSTATECHGSERV.4488: TRACE:at: { tpcall(".TMIB", 0x4001aea0, 0, 0x7f7f2ca4, 0x7f7f2ca0, 0x0)
    152234.CWSFEP1!DBSTATECHGSERV.4488: TRACE:at: } tpcall = -1 [tperrno TPESVCFAIL]
    152234.CWSFEP1!DBSTATECHGSERV.4488: value of retc -1
    152234.CWSFEP1!DBSTATECHGSERV.4488: tpadmcall() failed:TPESVCFAIL - application level service failure
    152234.CWSFEP1!DBSTATECHGSERV.4488: past call to set svr to active
    152234.CWSFEP1!DBSTATECHGSERV.4488: TRACE:at: { tpfree(0x400289a0)
    152234.CWSFEP1!DBSTATECHGSERV.4488: TRACE:at: } tpfree
    152234.CWSFEP1!DBSTATECHGSERV.4488: got the subscription
    152234.CWSFEP1!DBSTATECHGSERV.4488: TRACE:at: { tpreturn(2, 0, 0x0, 0, 0x0)
    152234.CWSFEP1!DBSTATECHGSERV.4488: TRACE:at: } tpreturn [long jump]
    152234.CWSFEP1!DBSTATECHGSERV.4488: TRACE:at: } tpservice
    Something I am just not seeing. Thanks for your time.
    Jim

  • I need guidance on using an i-pad with older people

    I represent a UK Charity that is considering rolling out the use of i-pads to older people who attend day centres so that when they are at home they can access, very easily, information about local services, activities, friends, family etc. I have so far concluded that an i-pad with a mobile contract should allow them unfettered access the Internet  thus information and e-mails. It would not need another computer to piggy-back on nor a wireless router. Applications specifically tailored to older people who are living alone. I would like some guidance on the realities of persuading older people that the i-pad is not a 'computer' but merely a window to the world. I would welcome guidance on how to set up such a roll out programme, costs, pitfalls, unexpected advantages etc.Help !!?

    JohnPW wrote:
    I represent a UK Charity that is considering rolling out the use of i-pads to older people who attend day centres so that when they are at home they can access, very easily, information about local services, activities, friends, family etc. I have so far concluded that an i-pad with a mobile contract should allow them unfettered access the Internet  thus information and e-mails. It would not need another computer to piggy-back on nor a wireless router. Applications specifically tailored to older people who are living alone. I would like some guidance on the realities of persuading older people that the i-pad is not a 'computer' but merely a window to the world. I would welcome guidance on how to set up such a roll out programme, costs, pitfalls, unexpected advantages etc.Help !!?
    I would try a few iPads first, may work for some just fine, others likely not at all.
    Some of the drawbacks of the iPad for some seniors I've found are as follows:
    1: can't scale the UI for their poor eyesight
    2: touchscreen issues with colder fingers
    3: UI has a lot of hidden and not clear cut references, lots of guessing, harder to learn
    4: difficult to hold, no mouse, having to raise their arms to use, fragile device easily dropped.
    5: some sites they use are not compliant, or use plug-ins the iPad can't use, like historical records, government sites and such designed for a desktop OS and a mouse pointer
    Believe it or not, I've found Windows XP to be the best for seniors as they have had the most familiarity with it, but adopting to Windows 7 themed as close to Windows XP to be the most trouble free on newer machines.
    Your results may vary and your learning level of the seniors you work with may vary.
    Usually the ones are active will go out and buy their own iPad or computer they like, however with shut-ins your likely looking at doing everything for them and they are more interested in your company and may only feign interest. You'll find out the iPad is only being used while your there.
    If you really want to help them, then give them something as close to what they already know how to use or others can assist to take the workload off you.
    They mostly prefer a mouse, pointer and a keyboard over a touchscreen.
    All I can suggest is s mixed approach, not all iPad and not all desktop computers, however you will find the desktop computers are considerably less headache, cost less , autoupdate etc., and break down less than a iPad.
    You can set the desktop machine to do things automatically, it's always hooked to the power, the iPad needs to be charged, it needs this or that update and so forth.
    Not knocking the iPad, and it can work for some, but likely not all.
    I know as a young person it's tempting to think a lot of older seniors can grasp new technology as  easy as the young, but a lot don't, it's a whole new different way of doing things and it's foreign to them, take them so long to learn they they don't want to bother.
    So sometimes it's just better to give them something as close to what they already know, your trying to help them remain active, not torture them with every new technological gadget that magically appears on the market, is popular now but won't be 3 years from now as something newer is released.
    You'll catch on soon enough who you can use a iPad with or not, unfortunatly a "organization" is thinking a global rollout, when a much more tailored approach is better.
    I've hope I've made my point.
    Good luck

  • Need guidance for using EEWB

    Hi Friends,
    I have created a project in transaction EEWB.
    Then i have created an extension, in the extension i have given following details
    1. Business Object : BUPA.
    2. Extension Type : ADD_NEW_FIELDS.
    Then i had started wizard , maintained some fields as per the requirements and completed the processes.
    Now i can see the TASK  where in I can see the details of the newly created DDIC objects.
    Is there anything else i am supposed to do apart from these steps to view newly created fields?
    Please help me.
    Reward points guaranteed

    Sohit
       Have you saved the Projects and Extension on the Transport Request ?
       Also try to re-generating the same !
       <a href="http://help.sap.com/saphelp_crm50/helpdata/en/81/1d5303c023da438e792316c9d25a84/frameset.htm">Post Processing</a> needs to be done
    Thanks
    <b>Allot points if this helps !</b>

  • Internal system call used by "ps" command

    Hi All,
    Can any one let me the internal system call used by "ps" command to retrieve the process information. I want to use the same system call in my program to get list of information about processes currently running in the system. I do not want to use the "ps" command in my code.

    Justin_Samuel wrote:
    Hi All,
    Can any one let me the internal system call used by "ps" command to retrieve the process information. I want to use the same system call in my program to get list of information about processes currently running in the system. I do not want to use the "ps" command in my code.You can access the /proc filesystem for getting information about
    processes, even more than is available via ps.
    Have a look at:
    man -s 4 proc

  • System call "copy" for C++ compiler 4.2?

    System call "rename" is very close to what I am looking for but "copy" is better because I need to keep the original file. Where I can find it, or any equivalent?
    MM
    [email protected]

    I don't know of a Solaris system call to copy files. I do know there is no such C or C++ standard library function.
    It's easy enough to write a file copy routine, however.
    C++ 4.2 is obsolete and no longer supported. It predates the 1998 C++ standard by a few years.
    But using old-style C++, here is a copy-file routine:
    #include <fstream.h>
    int copyfiles(const char* i, const char* o)
    ifstream in(i, ios::in|ios::binary);
    ofstream out(o, ios::out|ios::binary);
    out << in.rdbuf();
    return !(!in && !out);
    You pass it the names of the input and output files. It opens the files in binary mode, copies input to output if possible, and reports status by returning 1 for success and 0 for failure.
    Using standard C++, the routine looks like this:
    #include <fstream>
    bool copyfiles(const char* i, const char* o)
    std::ifstream in(i, std::ios::binary);
    std::ofstream out(o, std::ios::binary);
    out << in.rdbuf();
    return !(!in && !out);

  • System call support for unicodes

    Hi Solaris guru,
    One of my application (C,Solaris2.7) is required to work in multiple languages. This application makes use of system & C library calls. Is it possible for a japanese user to create file names in japanese? if so how will I able to use these names (let's assume unicodes) with standard system calls and library routines which consider file names has char *?
    I have noticed that Solaris provides wchar_t and (wchar.h) wide string library calls (Ex, wprintf, wscanf, wcstrcmp etc). are there any similar w-version of system calls?
    I greatly appreciate your help.
    Cheers
    Ramesh

    I don't know of a Solaris system call to copy files. I do know there is no such C or C++ standard library function.
    It's easy enough to write a file copy routine, however.
    C++ 4.2 is obsolete and no longer supported. It predates the 1998 C++ standard by a few years.
    But using old-style C++, here is a copy-file routine:
    #include <fstream.h>
    int copyfiles(const char* i, const char* o)
    ifstream in(i, ios::in|ios::binary);
    ofstream out(o, ios::out|ios::binary);
    out << in.rdbuf();
    return !(!in && !out);
    You pass it the names of the input and output files. It opens the files in binary mode, copies input to output if possible, and reports status by returning 1 for success and 0 for failure.
    Using standard C++, the routine looks like this:
    #include <fstream>
    bool copyfiles(const char* i, const char* o)
    std::ifstream in(i, std::ios::binary);
    std::ofstream out(o, std::ios::binary);
    out << in.rdbuf();
    return !(!in && !out);

  • Problems with accept () system call in Solaris 10

    We are doing some prototyping in Solaris 10/Zones using TCP sockets and have encountered the problem the "accept" system call in Solaris 10 always seem to return immediately without waiting for clients to connect to it. The same program works fine under Solaris 9 without any problems.
    So in the following call:
    ssock = accept( sockfd, (struct sockaddr*)bind_address, &alen );
    if( ssock < 0 )
    printf( "Accept failed: ...\n" );
    the program always prints "accept failed: " continuously. Is this a known issue?

    The problem only occurs when we use INADDR_ANY to bind a socket. The program works as expected when we use real as well as virtual IP address configured for an interface on any Solaris Zone. When we use INADDR_ANY, error number is 14 (EFAULT, Bad Address).
    Just wondering if we need to make any configuration changes in order to allow INADDR_ANY to work.

  • Solaris 10: intercepting system calls

    Hello,
    I have a problem: I don't manage to intercept system calls (as described in this document http://packetstormsecurity.org/groups/thc/slkm-1.0.html). Is it because solaris 10 doesn't use the syscall table ?
    Another problem that I have is that I don't manage to perform a simple printf() on the screen when I use a load my kernel module. Has someone got an explanation ?
    In fact I need to intercept some syscall like SYS_open, SYS_read, ... to perform custom actions. Do you have another way to do this ?
    Thanks in advance for you help.

    BTW, I'm running 64-bit Solaris as a VirtualBox (3.0.10) guest VM on a 32-bit WinXP host.

  • Correct Forum? CGI and Server behaviour on Solaris at system()-call

    Hi to you all,
    Do not know if i am in the correct forum, but maybe it is a Webserver problem.
    I have Sun ONE Webserver 6.1 running on Solaris.
    Craete some CGI`s in C.
    Now I have a problem with one CGI, which have to call a Shellscript via system() call.
    The Client just calls the CGI with some parameters, which will write the informations in a file with some additional informations from a database, after that, the script should be startet and do some printjobs in the background.
    The CGI and the Shell-script is working fine. My Problem is, that the system() call always waits, until the ShellScript has finished, so the Webserver send the "data successful written" site after a couple of minutes, it should send it immeditatly to the client, so the session is closed.
    I have tried to put the shellscript in background with "&", also with nohup and a second shell script which justs starts the first script, also with all combinations of nohup and "&" for background process.
    also i tried with "pclose(popen(SCRIPT,"W");" to call the script, it is always the same, the session will close only, when the script has been finished.
    In an other Forum I found an entry, that , however, IPlanet webserver always will do this in this way. The session will be closed, when all called processes has benn fisnished.
    Any Ideas to solve my problem?

    The web server reads from the CGI program's stdout. It knows the HTTP response is complete when the CGI program closes its stdout.
    When you call system(), the child process inherits the CGI program's stdout and keeps it open until it finishes. If you want the child process to run asynchronously from the HTTP response, you should give the child process a new stdout with > /dev/null. (You'll still need to place the child process in the background with &.) Alternatively, you can fork(), close(1), then exec().

  • OK to use fdisk/100% "SOLARIS System" partition for RAID6 Virtual Drive?

    Solaris newb, here - I am configuring an x4270 with 16 135 GB drives. Basic approach is
    D0, D1: RAID 1 (Boot volume, Solaris, Oracle Software)
    D2-D13: RAID 6 (Oracle dB files)
    D14, D15: global spares
    After configuring the RAID's w/WebBIOS Utility, I am now trying to format/partition the RAID 6 Virtual Drive, which shows up as 1.327 TB 'Optimal' in the MegaRAID Storage Manager. After hunting around the ether for advice on how to do this, I came across http://docs.oracle.com/cd/E23824_01/html/821-1459/disksxadd-50.html#disksxadd-54639
    "Creating a Solaris fdisk Partition That Spans the Entire Drive"
    which is painfully simple: after 'format', just do an 'fdisk' and accept the default 100% "SOLARIS System" partition. After doing this, partition>print and prtvtoc show this:
    partition> print
    Current partition table (original):
    Total disk cylinders available: 59125 + 2 (reserved cylinders)
    Part Tag Flag Cylinders Size Blocks
    0 unassigned wm 0 0 (0/0/0) 0
    1 unassigned wm 0 0 (0/0/0) 0
    2 backup wu 0 - 59124 1.33TB (59125/0/0) 2849529375
    3 unassigned wm 0 0 (0/0/0) 0
    4 unassigned wm 0 0 (0/0/0) 0
    5 unassigned wm 0 0 (0/0/0) 0
    6 unassigned wm 0 0 (0/0/0) 0
    7 unassigned wm 0 0 (0/0/0) 0
    8 boot wu 0 - 0 23.53MB (1/0/0) 48195
    9 unassigned wm 0 0 (0/0/0) 0
    # prtvtoc /dev/dsk/c0t1d0s2
    * /dev/dsk/c0t1d0s2 partition map
    * Dimensions:
    * 512 bytes/sector
    * 189 sectors/track
    * 255 tracks/cylinder
    * 48195 sectors/cylinder
    * 59127 cylinders
    * 59125 accessible cylinders
    * Flags:
    * 1: unmountable
    * 10: read-only
    * Unallocated space:
    * First Sector Last
    * Sector Count Sector
    * 48195 2849481180 2849529374
    * First Sector Last
    * Partition Tag Flags Sector Count Sector Mount Directory
    2 5 01 0 2849529375 2849529374
    8 1 01 0 48195 48194
    My question: is there anything inherently wrong with this default partitioning? Database is for OLTP & fairly small (<200 GB), with about 140 GB being LOB images.
    Thanks,
    Barry

    First off, RAID-5 or RAID-6 is fine for database performance unless you have some REALLY strict and REALLY astronomical performance requirements. Requirements that someone with lots of money is willing to pay to meet.
    You're running a single small x86 box with only onboard storage.
    So no, you're not operating in that type of environment.
    Here's what I'd do, based upon a whole lot of experience with Solaris 10 and not so much with Solaris 11, and also assuming this box is going to be around for a good long time as an Oracle DB server:
    1. Don't use SVM for your boot drives. Use the onboard RAID controller to make TWO 2-disk RAID-1 mirrors. Use these for TWO ZFS root pools. Why two? Because if you use live upgrade to patch the OS, you want to create a new boot environment in a separate ZFS pool. If you use live upgrade to create new boot environments in the same ZFS pool, you wind up with a ZFS clone/snapshot hell. If you use two separate root pools, each new boot environment is a pool-to-pool actual copy that gets patched, so there are no ZFS snapshot/clone dependencies between the boot environments. Those snapshot/clone dependencies can cause a lot of problems with full disk drives if you wind up with a string of boot environments, and at best they can be a complete pain in the buttocks to clean up - assuming live upgrade doesn't mess up the clones/snapshots so badly you CAN'T clean them up (yeah, it has been known to do just that...). You do your first install with a ZFS rpool, then create rpool2 on the other mirror. Each time you do an lucreate to create a new boot environment from the current boot environment, create the new boot environment in the rpool that ISN'T the one the current boot environment is located in. That makes for ZERO ZFS dependencies between boot environments (at least in Solaris 10. Although with separate rpools, I don't see how that could change....), and there's no software written that can screw up a dependency that doesn't exist.
    2. Create a third RAID-1 mirror either with the onboard RAID controller or ZFS, Use those two drives for home directories. You do NOT want home directories located on an rpool within a live upgrade boot environment. If you put home directories inside a live upgrade boot environment, 1) that can be a LOT of data that gets copied, 2) if you have to revert back to an old boot environment because the latest OS patches broke something, you'll also revert every user's home directory back.
    3. That leaves you 10 drives for a RAID-6 array for DB data. 8 data and two parity. Perfect. I'd use the onboard RAID controller if it supports RAID-6, otherwise I'd use ZFS and not bother with SVM.
    This also assumes you'd be pretty prompt in replacing any failed disks as there are no global spares. If there would be significant time before you'd even know you had a failed disk (days or weeks), let alone getting them replaced, I'd rethink that. In that case, if there were space I'd probably put home directories in the 10-disk RAID-6 drive, using ZFS to limit how big that ZFS file system could get. Then use the two drives freed up for spares.
    But if you're prompt in recognizing failed drives and getting them replaced, you probably don't need to do that. Although you might want to just for peace of mind if you do have the space in the RAID-6 pool.
    And yes, using four total disks for two OS root ZFS pools seems like overkill. But you'll be happy when four years from now you've had no problems doing OS upgrades when necessary, with minimal downtime needed for patching, and with the ability to revert to a previous OS patch level with a simple "luactivate BENAME; init 6" command.
    If you have two or more of these machines set up like that in a cluster with Oracle data on shared storage you could then do OS patching and upgrades with zero database downtime. Use lucreate to make new boot envs on each cluster member, update each new boot env, then do rolling "luactivate BENAME; init 6" reboots on each server, moving on to the next server after the previous one is back and fully operational after its reboot to a new boot environment.

  • How to get the size of physical memory by using system call ?

    how to get the size of physical memory by using system call ?What system call can be used for me to get the size of physical memor? thanks.

    %vmstat 3
    procs memory page disk faults cpu
    r b w swap free re mf pi po fr de sr s0 -- -- -- in sy cs us sy id
    0 0 0 3025816 994456 4 19 6 0 0 0 0 8 0 0 0 459 253 139 1 1 99
    0 0 0 2864688 777408 0 2 0 0 0 0 0 3 0 0 0 428 134 175 0 1 99
    0 0 0 2864688 777408 0 0 0 0 0 0 0 7 0 0 0 448 112 166 0 0 100
    one interesting observation about vmstat I found out is (mostly on Solaris)
    the first line of information always off chart, so I usually do a few interval to get constant result.
    if you use linux
    just
    cat /proc/meminfo

  • How to get swap size by using system call?

    How can I get the size of swap.What system call or library Routines can be used? please help me.

    Hi,
    Threre's an interface called swap_ctl by wich you can get more information related to virtual memory. Here's an example:
    #include <stdio.h>
    #include <stdlib.h>
    #include <unistd.h>
    #include <sys/stat.h>
    #include <sys/swap.h>
    #include <sys/param.h>
    int
    main(int argc, char*argv[])
    swaptbl_t *st;
    int swap_count, i;
    long long swap_total=0, swap_avail=0;
    long pgsize_in_kbytes = sysconf(_SC_PAGE_SIZE) / 1024L;
    if ((swap_count=swapctl(SC_GETNSWP, NULL)) == -1)
    perror("swapctl(SC_GETNSWP)"), exit(-1);
    if (swap_count == 0)
    (void)printf("No swap files/partitions allocated\n"), exit(0);
    * Although it's not particularly clear in the documentation, you're
    * responsible for creating a variable length structure (ie. the
    * array is within the struct rather than being pointed to
    * by the struct). Also, it is necessary for you to allocate space
    * for the path strings (see /usr/include/sys/swap.h).
    st = (swaptbl_t*)malloc(sizeof(int) + swap_count * sizeof(struct swapent));
    if (st == NULL)
    perror(argv[0]), exit(-1);
    st->swt_n = swap_count;
    for (i=0; i < swap_count; i++) {
    if ((st->swt_ent.ste_path = (char*)malloc(MAXPATHLEN)) == NULL)
    perror(argv[0]), exit(-1);
    if ((swap_count=swapctl(SC_LIST, (void*)st)) == -1)
    perror("swapctl(SC_LIST)"), exit(-1);
    for (i=0; i < swap_count; i++) {
    swap_total += st->swt_ent.ste_pages * pgsize_in_kbytes;
    swap_avail += st->swt_ent.ste_free * pgsize_in_kbytes;
    (void)printf("Total swap = %lld available swap = %lld\n",
    swap_total, swap_avail);
    return 0;
    There's a very interesting document about Solaris Kernel/Performance Stats available at http://www.idiom.com/~gford/admin/howto/perf.html. Very interesting.
    Hope this helps

  • I need to set up Firefox on my IPad 2 to be able to use my MLS system. How do I do this?

    I need to set up Firefox on my IPad 2 to be able to use my MLS system. How do I do this?

    1. Mozilla doesn't have a version of Firefox for iOS, which is used on the iPad.
    2. Most MLS services aren't compatible with Firefox, they seem to use software that needs controls that are only available in Internet Explorer.

Maybe you are looking for

  • Full HD backup before sending in for repair-software recommended/how-to?

    Hi all, I have to send my MacBook 2GHz Intel Core 2 Duo running 10.4.11 in for a warrantied repair to the CD/DVD drive (MATSHITA DVD-R UJ-857D). It just doesn't want to read discs anymore and has always been a bit finicky. There are a few other issue

  • Maintenance Order using BAPI error

    Hi, While creating Maintenance Order using BAPI.. getting error no E-121  " Error reading the order 10004009 in the document tables" Orders are getting created but, still the error is generated. Kindly suggest how to rectify this error. Thanks Mona

  • Adding IR c5045 document scanner to Mt. Lion?

    Currently trying to scan to a document scanner via LAN in a k-12 environment. I do have print capabilities but the scanner does not show up. My Macbook is not enrolled with Active Directory. Rather, I am talking to the Printer / Scanner by the IP add

  • How to hide navigation panel buttons of interactive form

    Hi Gurs, Can any one expalin how to hide the navigation panel buttons of interactivge form through coding in WD. Thanks Rao. Edited by: rahul raao on Apr 30, 2009 9:57 AM

  • Price Determination (Pricing) Date Control in Info Record

    Hi, Can anyone help me with the use of Price Determination (Pricing) Date Control = 5 GR Date in Purchasing Info Record Does this help in the following case I have a PO for an year Each month vendor delivers @ different amount and it is known only @