From darkjoker at gmail.com Thu Mar 6 21:55:42 2008 From: darkjoker at gmail.com (=?ISO-8859-1?Q?Ignacio_Marambio_Cat=E1n?=) Date: Fri, 7 Mar 2008 02:55:42 -0300 Subject: [content-discuss] the magic of the shell, waiting for reviewers Message-ID: i left a little article at the contents projects about the way shell scripts works in the opensolaris environment[1] i would love to have it included in the opensolaris curriculum as it not only shows some parts of the opensolaris code but also uses serveral tools: the mdb. the source browser, DTrace and truss. I know the article is not as clear as it should be or as well formated, but i'm eager to correct whatever you feel it's necessary including the many typos i'm sure there are nacho [1] http://www.opensolaris.org/os/project/content/files/shells.pdf From michelle.olson at sun.com Fri Mar 7 10:47:47 2008 From: michelle.olson at sun.com (Michelle Olson) Date: Fri, 07 Mar 2008 10:47:47 -0800 Subject: [content-discuss] [docs-discuss] the magic of the shell, waiting for reviewers In-Reply-To: References: Message-ID: <47D18DD3.5040300@sun.com> Hi Nacho, Thanks for your time to write this up, I think it is an excellent addition to the curriculum. (I finally have the source preparations complete for that document, BTW, so I'll get a project proposal together so we can put the files in a repo soon.) Here are my review comments: [mo-1] Introduction, change 'very people' to 'very few people' [mo-2] Introduction, change 'work the way they do, most' to 'work the way they do. Most' [mo-3] Introduction, change 'script has to start' with 'script must begin' [mo-4] Introduction, change 'This reality pushed me to write this few paragraphs. Throughout them, I will try to show how they' to 'This reality inspired me to write the following pages to demonstrate how shell scripts work in OpenSolaris.' [mo-5] The Basics, change 'I will try and show what happens when we run a script inside solaris, I will start with a simple script, hello.sh which has the following content' to 'Let's start with a simple script called hello.sh which has the following content.' [mo-6] The Basics, change 'Here comes truss(1).' to 'We'll use truss(1) in the following example to examine the system calls.' [mo-7] The Basics, change 'We were told that the whatever' to 'We know that whatever' [mo-8] The Basics, change 'So, execve then is calling our shell. from it's' to 'The output shows that execve is calling our shell. From its' [mo-9] The Basics, change 'we can read that it's the system call' to 'we can read that execve is the system call' [mo-10] The Basics, change 'Let's filter that instead then' to 'Let's filter execve instead then' [mo-11] The Basics, change 'by using truss agains the shell' to 'by using truss against the shell' [mo-12] The Basics, change 'but using ./hello.sh as a first parameter' to 'but it is using ./hello.sh as a first parameter' I'll send along comments on page two later today, thanks again for this writeup, very cool! -Michelle Ignacio Marambio Cat?n wrote: > i left a little article at the contents projects about the way shell > scripts works in the opensolaris environment[1] > i would love to have it included in the opensolaris curriculum as it > not only shows some parts of the opensolaris code but also uses > serveral tools: the mdb. the source browser, DTrace and truss. I know > the article is not as clear as it should be or as well formated, but > i'm eager to correct whatever you feel it's necessary including the > many typos i'm sure there are > > nacho > > [1] http://www.opensolaris.org/os/project/content/files/shells.pdf > _______________________________________________ > docs-discuss mailing list > docs-discuss at opensolaris.org > From darkjoker at gmail.com Wed Mar 12 16:46:06 2008 From: darkjoker at gmail.com (=?ISO-8859-1?Q?Ignacio_Marambio_Cat=E1n?=) Date: Wed, 12 Mar 2008 20:46:06 -0300 Subject: [content-discuss] [docs-discuss] the magic of the shell, waiting for reviewers In-Reply-To: <47D18DD3.5040300@sun.com> References: <47D18DD3.5040300@sun.com> Message-ID: On Fri, Mar 7, 2008 at 3:47 PM, Michelle Olson wrote: > Hi Nacho, > > Thanks for your time to write this up, I think it is an excellent > addition to the curriculum. (I finally have the source preparations > complete for that document, BTW, so I'll get a project proposal together > so we can put the files in a repo soon.) Here are my review comments: > already changed what you proposed, let me know if there is something else you would like to change and when the repo is ready. is anyone against including this in the curriculim? do you need the original .odt file to work with it? unfortunately i cannot save odt files withit the contents project. Also, i do know the document does not have my name written anywhere :P nacho From mo137222 at dhcp-umpk17-69-197.SFBay.Sun.COM Wed Mar 12 17:23:12 2008 From: mo137222 at dhcp-umpk17-69-197.SFBay.Sun.COM (mo137222 at dhcp-umpk17-69-197.SFBay.Sun.COM) Date: Wed, 12 Mar 2008 17:23:12 -0700 (PDT) Subject: [content-discuss] populate repo with latest changes Message-ID: <20080313002312.57CAA13E114@mail.opensolaris.org> Author: mo137222 at dhcp-umpk17-69-197.SFBay.Sun.COM Repository: /hg/content/curriculum Latest revision: 9a39be3c50d6275811461041c5c360c1a987302d Total changesets: 1 Log message: populate repo with latest changes Files: update: OSOLINTROOS.book From mo137222 at dhcp-umpk17-69-197.SFBay.Sun.COM Wed Mar 12 17:23:12 2008 From: mo137222 at dhcp-umpk17-69-197.SFBay.Sun.COM (mo137222 at dhcp-umpk17-69-197.SFBay.Sun.COM) Date: Wed, 12 Mar 2008 17:23:12 -0700 (PDT) Subject: [content-discuss] Add student guide files to repository; Message-ID: <20080313002312.5075213E112@mail.opensolaris.org> Author: mo137222 at dhcp-umpk17-69-197.SFBay.Sun.COM Repository: /hg/content/curriculum Latest revision: 8d61ff7ab7c2ca1f16cb5a83569c44199380247c Total changesets: 1 Log message: Add student guide files to repository; Files: create: OSOLINTROOS.book create: fr-legal.xml create: fr-other-trademarks.xml create: legal.xml create: other-trademarks.xml create: sun-trademarks.xml From michelle.olson at sun.com Wed Mar 12 17:45:37 2008 From: michelle.olson at sun.com (Michelle Olson) Date: Wed, 12 Mar 2008 17:45:37 -0700 Subject: [content-discuss] [docs-discuss] the magic of the shell, waiting for reviewers In-Reply-To: References: <47D18DD3.5040300@sun.com> Message-ID: <47D87931.1090808@sun.com> Hi Nacho, Thanks for this reminder -- it made me realize that we can just use the content project repo for the curriculum. I have setup the repo and pushed the files just now. Instructions for pulling a copy are on the main Content Project page. Let me know if you have any problems or questions, I'll get repositories for the translated versions setup tomorrow or Friday. Thank you for your continued interest in OSOL documentation and education materials! -Michelle Ignacio Marambio Cat?n wrote: > On Fri, Mar 7, 2008 at 3:47 PM, Michelle Olson wrote: > >> Hi Nacho, >> >> Thanks for your time to write this up, I think it is an excellent >> addition to the curriculum. (I finally have the source preparations >> complete for that document, BTW, so I'll get a project proposal together >> so we can put the files in a repo soon.) Here are my review comments: >> >> > already changed what you proposed, let me know if there is something > else you would like to change and when the repo is ready. > is anyone against including this in the curriculim? > do you need the original .odt file to work with it? unfortunately i > cannot save odt files withit the contents project. Also, i do know the > document does not have my name written anywhere :P > > nacho > From darkjoker at gmail.com Wed Mar 12 18:10:26 2008 From: darkjoker at gmail.com (=?ISO-8859-1?Q?Ignacio_Marambio_Cat=E1n?=) Date: Wed, 12 Mar 2008 22:10:26 -0300 Subject: [content-discuss] [docs-discuss] the magic of the shell, waiting for reviewers In-Reply-To: <47D87931.1090808@sun.com> References: <47D18DD3.5040300@sun.com> <47D87931.1090808@sun.com> Message-ID: On Wed, Mar 12, 2008 at 9:45 PM, Michelle Olson wrote: > Hi Nacho, > > Thanks for this reminder -- it made me realize that we can just use the > content project repo for the curriculum. I have setup the repo and > pushed the files just now. Instructions for pulling a copy are on the > main Content Project page. Let me know if you have any problems or > questions, I'll get repositories for the translated versions setup > tomorrow or Friday. > > Thank you for your continued interest in OSOL documentation and > education materials! > > just a little typo, check http://opensolaris.org/os/community/documentation/doc_collab/tools/ you either meant staroffice 8 or openoffice.org 2, there is no openoffice 8 nacho > -Michelle > > Ignacio Marambio Cat?n wrote: > > > > On Fri, Mar 7, 2008 at 3:47 PM, Michelle Olson wrote: > > > >> Hi Nacho, > >> > >> Thanks for your time to write this up, I think it is an excellent > >> addition to the curriculum. (I finally have the source preparations > >> complete for that document, BTW, so I'll get a project proposal together > >> so we can put the files in a repo soon.) Here are my review comments: > >> > >> > > already changed what you proposed, let me know if there is something > > else you would like to change and when the repo is ready. > > is anyone against including this in the curriculim? > > do you need the original .odt file to work with it? unfortunately i > > cannot save odt files withit the contents project. Also, i do know the > > document does not have my name written anywhere :P > > > > nacho > > > > From brendan at sun.com Wed Mar 12 19:40:17 2008 From: brendan at sun.com (Brendan Gregg - Sun Microsystems) Date: Wed, 12 Mar 2008 19:40:17 -0700 Subject: [content-discuss] [docs-discuss] the magic of the shell, waiting for reviewers In-Reply-To: References: Message-ID: <20080313024016.GA537495@zion.sfbay.sun.com> G'Day Nacho, Thanks for writing this up and showing how DTrace and mdb can be useful. Here are some comments. * "Let's review execve(2) then ... since we know it's a system call" - you start by discussing the libc execve() function (which calls into the kernel via _syscall()). I have the feeling the libc execve() function may be best called execve(3C), which then calls execve(2); it might be best to ask someone in code-discuss about that distinction. * "syscall::exece:entry ... printf("fd: %d", arg0);" - arg0 is the filename, not a file descriptor. You can try trace(copyinstr(arg0));. * About the mdb usage: - Why was "struct execsw" in quotes? - Why was struct execsw specified at all? (try "execsw::print") - Where did +0x50 come from? (eg, "execsw,3::print struct execsw") * Overall: - it might help to put an enumerated list of events near the end, to reinforce the order of events. - good opportunity to include a: dtrace -n 'fbt::findexec_by_hdr:entry { printf("%.4S", stringof(arg0)); stack(); }' to show how it is called twice, the first on '#!', the second on the ELF file. - A reference section at the end to point users to: http://www.opensolaris.org/os/community/dtrace http://www.opensolaris.org/os/community/mdb Solaris Internals, 2nd Ed. cheers, Brendan On Fri, Mar 07, 2008 at 02:55:42AM -0300, Ignacio Marambio Cat?n wrote: > i left a little article at the contents projects about the way shell > scripts works in the opensolaris environment[1] > i would love to have it included in the opensolaris curriculum as it > not only shows some parts of the opensolaris code but also uses > serveral tools: the mdb. the source browser, DTrace and truss. I know > the article is not as clear as it should be or as well formated, but > i'm eager to correct whatever you feel it's necessary including the > many typos i'm sure there are > > nacho > > [1] http://www.opensolaris.org/os/project/content/files/shells.pdf > _______________________________________________ > docs-discuss mailing list > docs-discuss at opensolaris.org -- Brendan [CA, USA] From darkjoker at gmail.com Thu Mar 13 05:22:00 2008 From: darkjoker at gmail.com (=?ISO-8859-1?Q?Ignacio_Marambio_Cat=E1n?=) Date: Thu, 13 Mar 2008 10:22:00 -0200 Subject: [content-discuss] [docs-discuss] the magic of the shell, waiting for reviewers In-Reply-To: <20080313024016.GA537495@zion.sfbay.sun.com> References: <20080313024016.GA537495@zion.sfbay.sun.com> Message-ID: On Thu, Mar 13, 2008 at 12:40 AM, Brendan Gregg - Sun Microsystems wrote: > G'Day Nacho, > > Thanks for writing this up and showing how DTrace and mdb can be useful. > Here are some comments. > > * "Let's review execve(2) then ... since we know it's a system call" > - you start by discussing the libc execve() function (which > calls into the kernel via _syscall()). I have the feeling > the libc execve() function may be best called execve(3C), which > then calls execve(2); it might be best to ask someone in > code-discuss about that distinction. That is an interesting question, but I think it's OK as it is, let me explain: execve(2) doesn't actually describe the system call but the libc version of the function. That man page actually points to exec(2) which also talks about execl, execle, execlp, execv and execvp > > * "syscall::exece:entry ... printf("fd: %d", arg0);" > - arg0 is the filename, not a file descriptor. You can try > trace(copyinstr(arg0));. All I was trying to do is show the flow of the code, so I guess that printf should not have been there in the first place, I do like what your change does so I'll just go ahead and modify the text accordingly some other script to show the path connecting the call to execve and exece would be useful too I think, I'll look into that > > * About the mdb usage: > - Why was "struct execsw" in quotes? > - Why was struct execsw specified at all? (try "execsw::print") > - Where did +0x50 come from? (eg, "execsw,3::print struct execsw") I think the +0x50 came from the sizeof(struct execsw) > > * Overall: > - it might help to put an enumerated list of events near the > end, to reinforce the order of events. > - good opportunity to include a: > dtrace -n 'fbt::findexec_by_hdr:entry { > printf("%.4S", stringof(arg0)); stack(); > }' > to show how it is called twice, the first on '#!', the second > on the ELF file. I like it > - A reference section at the end to point users to: > http://www.opensolaris.org/os/community/dtrace > http://www.opensolaris.org/os/community/mdb > Solaris Internals, 2nd Ed. I would like for this to be included in the curriculum tutorial, all those references are there already > > cheers, Thank you very much for the time nacho