IRC log of openacs on 2001-10-17
Timestamps are in UTC.
- 02:09:15 [davb]
- Any reason why this doesn;t work?
- 02:09:18 [davb]
- openacs-4=> select acs_permission__grant_permsission (
- 02:09:18 [davb]
- openacs-4(> 2480,
- 02:09:18 [davb]
- openacs-4(> acs__magic_object_id('the_public'),
- 02:09:18 [davb]
- openacs-4(> 'general_comments_create'
- 02:09:18 [davb]
- openacs-4(> );
- 02:09:34 [davb]
- I am getting one of these: ERROR: Function 'acs_permission__grant_permsissi(int4, int4, unknown)' does not exist
- 02:09:34 [davb]
- Unable to identify a function that satisfies the given argument types
- 02:09:34 [davb]
- You may need to add explicit typecasts
- 02:09:34 [davb]
- openacs-4=>
- 02:10:04 [davb]
- Why is 'general_comments_create' type unknown?
- 02:10:20 [davb]
- The function def is (int,int,varchar)
- 02:10:49 [docwolf]
- docwolf has joined #openacs
- 02:11:07 [rbm]
- try casting 'general_comments_create'::varchar
- 02:11:14 [rbm]
- upon passing
- 02:11:55 [davb]
- thanks!
- 02:12:37 [davb]
- Ok that doesn't work either. Hmmmm
- 02:12:37 [rbm]
- Thank me when you get it working :)
- 02:12:41 [rbm]
- See?
- 02:12:52 [davb]
- Rightm but that means the function doesn;t exist.
- 02:13:07 [davb]
- I wonder why. That one HAS to be there I got it all installed.
- 02:13:12 [rbm]
- does acs__magic_object_id('the_public') return an int?
- 02:13:50 [davb]
- yes. I tried -1 also in place of that for fun.
- 02:15:00 [davb]
- Aha mine is truncated to acs__permision_grant_permissi
- 02:15:11 [rbm]
- openacs-4=# select proname, pronargs, proargtypes from pg_proc where proname like 'acs_permission%';
- 02:15:11 [rbm]
- proname | pronargs | proargtypes
- 02:15:11 [rbm]
- ---------------------------------+----------+-------------
- 02:15:11 [rbm]
- acs_permission__grant_permissio | 3 | 23 23 1043
- 02:15:11 [rbm]
- acs_permission__permission_p | 3 | 23 23 1043
- 02:15:11 [rbm]
- acs_permission__revoke_permissi | 3 | 23 23 1043
- 02:15:13 [rbm]
- acs_permissions_lock_tr | 0 |
- 02:15:21 [davb]
- the function is acs__permission__grant_permissio
- 02:15:35 [rbm]
- Doesn't matter. PG will truncate for you when you call it.
- 02:15:59 [davb]
- yeah but its truncating it differently than the function name.
- 02:16:08 [rbm]
- No it isn't
- 02:16:14 [davb]
- hmmmm
- 02:16:33 [davb]
- argh! I spelled it wrong like 20 times.
- 02:16:39 [davb]
- thnaks!
- 02:16:46 [rbm]
- did it work?
- 02:17:24 [davb]
- yes.
- 02:17:41 [davb]
- but it doesn;t work in my pl/pgsql function.
- 02:26:11 [rbm]
- anyone knows how to use ON DELETE CASCADE?
- 02:26:35 [davb]
- sorry, no.
- 02:32:30 [docwolf]
- docwolf has quit
- 02:57:57 [davb]
- anything wrong with this?
- 02:58:01 [davb]
- -- Copy permissions from the parent:
- 02:58:01 [davb]
- for v_permission_row in
- 02:58:01 [davb]
- select grantee_id,privilege from acs_permissions
- 02:58:01 [davb]
- where object_id = p_parent_id
- 02:58:01 [davb]
- loop
- 02:58:01 [davb]
- perform acs_permission__grant_permission(
- 02:58:03 [davb]
- v_folder_id, -- object_id
- 02:58:06 [davb]
- v_permission_row.grantee_id, -- grantee_id
- 02:58:08 [davb]
- v_permission_row.privilege -- privilege
- 02:58:10 [davb]
- );
- 02:58:12 [davb]
- end loop;
- 02:58:14 [davb]
- oops
- 03:00:47 [rbm]
- Is v_permission_row declared as a RECORD?
- 03:02:24 [davb]
- its defined as acs_permissionsOWTYPE
- 03:02:35 [davb]
- hey my disapperad
- 03:02:38 [davb]
- argh!
- 03:02:43 [davb]
- %
- 03:02:58 [davb]
- well the % and R fell off rowtype
- 03:24:20 [davb]
- rbm: practical postgresql has a pretty good chapter on pl/pgsql.
- 03:24:57 [davb]
- well time for me to go
- 03:25:00 [davb]
- davb has quit
- 04:03:55 [hazmat]
- hazmat has joined #openacs
- 04:33:26 [hazmat]
- hazmat has quit
- 05:32:34 [hazmat]
- hazmat has joined #openacs
- 05:48:16 [hazmat]
- ns_soap in is cvs at sf nssoap.sf.net
- 05:48:28 [hazmat]
- s/in is / is in
- 06:26:55 [rafa]
- rafa has left #openacs
- 08:17:33 [jerryasher]
- jerryasher has joined #openacs
- 08:17:39 [jerryasher]
- jerryasher has quit
- 08:43:46 [jerryasher]
- jerryasher has joined #openacs
- 08:44:34 [jerryasher]
- Where's the place to swap aD rumors?
- 08:57:40 [jerryasher]
- Or are they so yesterday's news that no one cares anymore?
- 09:15:45 [jerryasher]
- jerryasher has quit
- 09:45:35 [rzolf]
- rzolf has joined #openacs
- 10:28:44 [rzolf]
- rzolf has quit
- 10:36:39 [ola]
- ola has joined #openacs
- 10:54:25 [ola]
- ola has quit
- 11:03:28 [ola]
- ola has joined #openacs
- 11:32:18 [ola]
- ola has quit
- 12:16:04 [Spork]
- Spork has quit
- 13:09:24 [davb]
- davb has joined #openacs
- 13:31:38 [markd2]
- markd2 has joined #openacs
- 13:37:40 [markd2]
- markd2 has quit
- 13:40:09 [markd2]
- markd2 has joined #openacs
- 14:13:10 [vinod]
- vinod has joined #openacs
- 14:13:18 [davb]
- Hi vinod, markd2
- 14:13:25 [vinod]
- happy birthday markd2 !!!!!!!!!!!
- 14:13:31 [vinod]
- hey dave!
- 14:22:53 [markd2]
- :-)
- 14:23:15 [markd2]
- I'm still 6 years younger than my main social group up here
- 14:23:18 [markd2]
- but I'm catching up!
- 14:24:09 [davb]
- heh
- 14:26:02 [vinod]
- that's my trick, too - age is relative, so always hang out with old people :-)
- 14:27:16 [markd2]
- that's why you like hanging around with me, right?
- 14:27:54 [vinod]
- hey.... no... not at all... you're older than me?? I had *no* idea
- 14:28:00 [vinod]
- * vinod has innocent look on face
- 14:28:36 [vinod]
- :-)
- 14:29:56 [davb]
- vinod: what do you use for a FOR IN LOOP in pl/pgsql ROWTYPE or RECORD? I always have a problem when I use ROWTYPE.
- 14:30:16 [markd2]
- heh
- 14:30:20 [markd2]
- PERFORMER
- 14:30:57 [vinod]
- davb: use ROWTYPE if the row that you're getting is exactly like the row in the db, otherwise use RECORD
- 14:31:16 [vinod]
- * vinod can't think of a way to use PERFORM here
- 14:31:32 [davb]
- What do you mean by EXACTLY. Does it have to contain all the same columns?
- 14:31:38 [vinod]
- yep, i think so
- 14:31:47 [davb]
- OK, so if a couple a missing, use RECORD?
- 14:32:09 [vinod]
- yep
- 14:32:32 [davb]
- OK. I don't think PL/SQL works like that.
- 14:33:07 [vinod]
- no, i think you're right. i remember banging my head against that a while back
- 14:33:28 [ola]
- ola has joined #openacs
- 14:33:33 [markd2]
- vinod is correct (of course)
- 14:33:57 [ola]
- hi all!
- 14:34:10 [davb]
- Right, but I think it works in Oracle with ROWTYPE. All the original code uses that. Does oracle have RECORD?
- 14:34:17 [vinod]
- hey ola!
- 14:34:35 [davb]
- hi ola
- 14:34:51 [davb]
- That should be in the Postgresql docs somewhere.
- 14:36:18 [davb]
- YEAH! I got a different error message.
- 14:36:41 [davb]
- b
- 14:38:33 [ola]
- c
- 14:38:45 [vinod]
- c++
- 14:39:37 [markd2]
- * markd2 loves C and C++
- 14:39:50 [markd2]
- they make me feel more manly when I get something working
- 14:40:08 [davb]
- Real men program in assembly
- 14:40:25 [markd2]
- real men cat > app-name and enter the bytes
- 14:40:44 [davb]
- hehe
- 14:41:02 [davb]
- now thats fun.
- 14:41:05 [vinod]
- markd2 should start an internet-university teaching real-man tricks
- 14:41:14 [markd2]
- He-Man tricks
- 14:41:17 [vinod]
- i'd enroll
- 14:41:20 [vinod]
- :-)
- 14:41:23 [markd2]
- * markd2 shouts "by the power of Numbskull!"
- 14:41:30 [vinod]
- Masters of the Universe!
- 14:41:51 [markd2]
- did you ever watch Thundercats?
- 14:42:08 [davb]
- Ok. How do you guys roll your server error logs?
- 14:42:14 [vinod]
- i think by accident - i was a He-Man fan
- 14:42:20 [markd2]
- ah
- 14:42:23 [markd2]
- I found some outtakes
- 14:42:25 [markd2]
- http://www.claws-and-paws.com/thundercats/index.shtml#outtakes
- 14:42:29 [vinod]
- davb: i use logrotate
- 14:43:11 [ola]
- seriously, how do I add code to the openacs.org tree?
- 14:43:15 [davb]
- yeah its a debian package
- 14:43:31 [davb]
- cvs add , cvs commit
- 14:43:48 [ola]
- I checked out acs-core as "olah", now what?
- 14:44:19 [vinod]
- markd2: these outtakes are great
- 14:44:36 [ola]
- shall I log in to their server?
- 14:44:40 [davb]
- Nope.
- 14:45:03 [davb]
- Well, actually depends on how your CVS is setup. My CVS environment is setup to use OpenACS.org as the server
- 14:45:05 [davb]
- etc...
- 14:45:12 [davb]
- So I don't have to login.
- 14:45:25 [ola]
- ok. I copied my package to /packages
- 14:45:29 [davb]
- when you do add or commit it should ask for your password.
- 14:45:37 [ola]
- davb: mine is too
- 14:45:42 [davb]
- ok
- 14:45:59 [vinod]
- ola: you'll have to check out the mp3 package from openacs first
- 14:46:12 [ola]
- vinod: I did that.
- 14:46:16 [davb]
- right, then replace it with your new files.
- 14:46:19 [vinod]
- oh, ok
- 14:46:45 [davb]
- ola: did someone create the package under the new name?
- 14:46:45 [Spork]
- Spork has joined #openacs
- 14:46:50 [ola]
- vinod: NO I didn't, sorry..
- 14:46:53 [davb]
- in the CVS tree?
- 14:46:55 [Spork]
- Hey all
- 14:47:02 [vinod]
- hey Spork
- 14:47:06 [ola]
- heh Spork
- 14:47:16 [ola]
- s/heh/hey
- 14:47:24 [Spork]
- Hola ola, privet vinod
- 14:47:26 [davb]
- hey logrotate is already installed.
- 14:47:30 [davb]
- hi spork
- 14:47:33 [Spork]
- * Spork needs some greeting that rhymes with vinod
- 14:47:36 [Spork]
- hey dave
- 14:48:01 [vinod]
- davb: isn't debian great?
- 14:48:04 [GEM]
- GEM has joined #openacs
- 14:48:13 [davb]
- Hi GEM!
- 14:48:13 [vinod]
- GEM!
- 14:48:13 [ola]
- spork: just call him; Mr PERFORM.
- 14:48:18 [Spork]
- hola
- 14:48:39 [GEM]
- Hey davb and vinod! How's life?
- 14:49:25 [Spork]
- * Spork sporks GEM for not saying hi to spork
- 14:49:27 [davb]
- Just finishing up static-pages.
- 14:49:57 [markd2]
- Hiya Psychephylax
- 14:50:06 [Spork]
- Hey mark
- 14:50:21 [Spork]
- * Spork sticks a "Hello $1!" on his forehead
- 14:50:26 [ola]
- davb: when I've replaced it with the new files, should I remove the CVS dirs?
- 14:50:31 [GEM]
- sorry, Spork! Hi to you, too!
- 14:50:43 [markd2]
- hi chump! long time no see!
- 14:50:49 [Spork]
- * Spork points to the sign on his head
- 14:51:17 [vinod]
- GEM: life is good. how bout with you?
- 14:51:17 [chump]
- Label GEM not found.
- 14:51:18 [davb]
- no. just do a cvs add for any new files (XQL etc...) and then cvs commit
- 14:51:27 [davb]
- it will update the tree.
- 14:51:51 [davb]
- if your other directory has a CVS directory in it, don't copy that over.
- 14:52:27 [GEM]
- Not too bad, thanks, Vinod. my mortgage has been sold again. I forget if I've talked in this channel since I got married, though...that is good stuff
- 14:52:27 [ola]
- davb: ok. thanks. I'll try.
- 14:52:54 [vinod]
- congrats GEM!
- 14:55:27 [ola]
- I must leave. see y'all later
- 14:55:34 [ola]
- ola has quit
- 14:55:58 [markd2]
- yes we are. it's just a very long driveway
- 14:57:37 [Spork]
- anyone use VNC here?
- 15:02:16 [davb]
- nope
- 15:07:11 [talli]
- talli has joined #openacs
- 15:07:20 [davb]
- Hi talli
- 15:07:29 [talli]
- hey guys
- 15:08:11 [talli]
- is markd here?
- 15:08:38 [Spork]
- he was
- 15:08:46 [markd2]
- yep!
- 15:08:53 [Spork]
- * Spork pokes markd with his extra pointy 'ork
- 15:08:54 [markd2]
- * markd2 is lurking
- 15:08:59 [markd2]
- or a lurking horror. not sure which
- 15:09:18 [vinod]
- i'm here too, talli
- 15:10:59 [GEM]
- watch out for the library. I didn't think it was snowing that hard yet
- 15:15:50 [talli]
- vinod, did i ask for you?
- 15:15:55 [talli]
- go back to your sewing
- 15:16:06 [markd2]
- that little sew-and-sew
- 15:16:24 [talli]
- markd, this is a very dangerous question, but...
- 15:16:48 [talli]
- how hard would it be to port the OpenACS to sybase given the query dispatcher? how different is it from oracle and PG?
- 15:16:51 [markd2]
- * markd2 hears the scary music in the background
- 15:17:05 [markd2]
- hmmm
- 15:17:11 [markd2]
- I won't be easy I bet
- 15:17:21 [markd2]
- oracle and sybase have pretty radically different concepts over locks and transactions
- 15:18:02 [talli]
- ok.
- 15:18:04 [vinod]
- * vinod goes back to his sewing
- 15:18:11 [talli]
- is that a showstopper?
- 15:18:46 [markd2]
- it'll mean some work and some tuning
- 15:18:59 [talli]
- ok, thanks
- 15:19:00 [markd2]
- go to a book store, find Thomas Kyte's "Oracle one-on-one" book by Wrox press
- 15:19:02 [talli]
- another q...
- 15:19:09 [markd2]
- read the chapter that talks about transactions
- 15:19:14 [markd2]
- it compares oracle and sybase
- 15:19:20 [talli]
- ok, cool. thanks
- 15:19:29 [talli]
- do you know if AOLserver runs on AIX?
- 15:19:39 [markd2]
- AOL never did a port
- 15:19:48 [markd2]
- there ma ybe someone out thre that's done it
- 15:19:56 [markd2]
- get the source and look for AIX
- 15:20:04 [talli]
- ok
- 15:20:04 [markd2]
- if there aren't any, then nobody ported and submitted the diffs
- 15:20:13 [talli]
- would it be hard?
- 15:20:50 [talli]
- i'm talking to a guy who apparently has an NT and AIX setup
- 15:21:18 [talli]
- the ideal situation is probably get some little server running Linux, AOLserver and the OPenACS code that connects to AIX
- 15:21:49 [talli]
- but i would like to advise him one way or the other
- 15:23:10 [talli]
- maybe i'll just tell him to use ACS Java which will solve all of his problems
- 15:23:16 [talli]
- that runs anywhere!
- 15:23:47 [markd2]
- I'd a imagine an AIX port would be hard
- 15:24:01 [talli]
- ok, cool
- 15:24:01 [talli]
- thanks
- 15:54:12 [davb]
- argh, the referential integrity weirdness in postgresql gets me again.
- 16:12:34 [davb]
- how can I get EMACS to re-read the error log?
- 16:13:24 [davb]
- without closing and ropening a buffer.
- 16:26:05 [ola]
- ola has joined #openacs
- 16:27:47 [markd2]
- you can re-open it
- 16:27:50 [markd2]
- and M-x revert-file
- 16:27:52 [markd2]
- I open a shell in emacs and do a tail -f
- 16:27:52 [markd2]
- no need to re-load it :-)
- 16:28:01 [vinod]
- vinod has quit
- 16:28:04 [talli]
- talli has quit
- 16:28:04 [rbm]
- rbm has quit
- 16:28:04 [Spork]
- Spork has quit
- 16:29:46 [davb]
- thanks markd2
- 16:31:39 [davb]
- oops. if you drop/create a function thats called by other functions you have to drop/create them all in postgresql
- 16:31:54 [ola]
- bummer
- 16:32:17 [davb]
- when it creates the function it references the OID of the other functions in there.
- 16:32:46 [davb]
- it just gets tricky when you do it 3 or 4 levels deep.
- 16:32:57 [davb]
- thats why I end up dropdb/createdb alot.
- 16:35:05 [ola]
- it's sometimes enough to do /i "path-to-drop-script" in psql
- 16:35:45 [davb]
- my drop script is broken. I have to fix it. Has to do with dropping columns
- 16:39:49 [markd2]
- markd2 has quit
- 16:40:24 [davb]
- ack. my content_item__new hacked function need to be rehacked.
- 16:51:28 [rbm]
- rbm has joined #openacs
- 16:51:28 [Spork]
- Spork has joined #openacs
- 16:57:46 [hazmat]
- davb: if it makes you feel better create or replace function (retaining oid) is coming
- 16:58:35 [davb]
- COOL!
- 17:24:06 [rbm]
- * rbm moos
- 17:24:14 [Spork]
- mooo
- 17:27:36 [ola]
- doh! I think I'll just stop breathing...:
- 17:27:39 [ola]
- **** Access denied: Insufficient Karma (olah|openacs-4/packages/mp3jukebox)
- 17:27:40 [ola]
- cvs server: Pre-commit check failed
- 17:30:12 [Spork]
- what does puts do again?
- 17:30:18 [Spork]
- arg
- 17:30:21 [Spork]
- * Spork pauses
- 17:31:37 [Spork]
- never mind
- 17:31:46 [Spork]
- I have my big book of TCL/TK goodies with me today
- 17:32:09 [Spork]
- I do want to know how to append to something
- 17:35:01 [hazmat]
- tcl is such an easy language, easy to forget that is:)
- 17:35:30 [Spork]
- lol
- 17:37:46 [Spork]
- it also doesn't like my formatting
- 17:37:52 [Spork]
- * Spork curses out the white spaces
- 17:38:32 [Spork]
- how would I group something so it expands but doesn't care about whitespaces?
- 17:40:56 [davb]
- read Tcl for web nerds.
- 17:41:09 [davb]
- Again. It explains pretty well how to get the brackets in the right place.
- 17:42:18 [davb]
- ola that's not your fault.
- 17:42:21 [davb]
- Email DonB
- 17:42:32 [davb]
- He is the Karma distributor.
- 17:42:47 [ola]
- heh
- 17:42:48 [davb]
- Spork append is append.
- 17:42:57 [davb]
- lappend adds another item to a list.
- 17:43:06 [davb]
- append varname "stuff"
- 17:45:10 [ola]
- davb: mp3jukebox has been renamed mp3-jukebox, so DonB told me I only have commit rights on that.
- 17:45:43 [davb]
- aha.
- 17:46:48 [ola]
- but when I do: "cvs co mp3-jukebox" I'm getting this:
- 17:46:56 [ola]
- cvs server: cannot find module `mp3-jukebox' - ignored
- 17:46:58 [ola]
- cvs [checkout aborted]: cannot expand modules
- 17:47:03 [davb]
- heh
- 17:47:05 [davb]
- what fun.
- 17:47:07 [ola]
- but...
- 17:47:15 [rbm]
- ola: I can check the server for you, hang on, let me ssh in there
- 17:47:33 [ola]
- rbm: great!
- 17:47:37 [davb]
- its not in the SDM repository.
- 17:47:42 [davb]
- yeah, rbm is handy to have around.
- 17:47:51 [davb]
- :)
- 17:48:09 [rbm]
- I still see it as mp3jukebox
- 17:48:24 [ola]
- when I do: cvs add mp3-jukebox it gives me this:
- 17:48:26 [ola]
- cvs [add aborted]: there is a version in mp3-jukebox already
- 17:48:45 [rbm]
- Hmmm. Who renamed this to mp3-jukebox?
- 17:49:48 [ola]
- DonB told me I only have commit rights on mp3-jukebox so I'd have to rename...
- 17:50:17 [rbm]
- Yeah, I see you only have rights to mp3-jukebox, but there's no mp3-jukebox dir created.
- 17:50:24 [rbm]
- I think you have to create it.
- 17:50:42 [rbm]
- create a mp3-jukebox dir, than copy all the files you have in, and commit them.
- 17:51:05 [rbm]
- I could do it for you, but then it'd take the fun out of your hands :)
- 17:52:16 [ola]
- I did, cd /web/openacs4/packages followed by "cvs add mp3-jukebox", with that directory existing!!
- 17:52:31 [ola]
- didn't work...
- 17:53:55 [ola]
- I *was* able to "cvs add" other files under mp3jukebox, though.
- 17:53:56 [rbm]
- hmm
- 17:54:08 [rbm]
- Why was it renamed anyways?
- 17:54:21 [ola]
- but then I did a check-out first
- 17:54:26 [davb]
- all-the-names-are-going-to-be-the-same-format
- 17:54:32 [rbm]
- Oh, I see
- 17:54:36 [davb]
- :)
- 17:54:42 [ola]
- :-)
- 17:54:42 [rbm]
- Let me add this darn thing
- 17:55:14 [ola]
- sure. may be the best thing to do...
- 17:57:03 [ola]
- rbm: you will only add an empty dir, right?
- 17:57:48 [rbm]
- yeah
- 18:02:47 [rbm]
- ola, try now
- 18:03:00 [rbm]
- I have to eat now. brb
- 18:03:16 [ola]
- rbm: thank you!
- 18:05:56 [markd2]
- markd2 has joined #openacs
- 18:14:02 [ola]
- rbm: insufficient Karma again.
- 18:18:26 [davb]
- I am getting a Cannot pass more than 16 arguments to a function error. No mention of where this function call is though...
- 18:23:01 [jerryasher]
- jerryasher has joined #openacs
- 18:23:16 [davb]
- hi jerry
- 18:23:23 [jerryasher]
- Hi Dave!
- 18:23:40 [jerryasher]
- I heard a rumor that aD was closing down various offices. Anyone know more about this?
- 18:23:49 [jerryasher]
- (Anyone care about aD anymore?)
- 18:27:53 [ola]
- hi jerry.
- 18:28:05 [ola]
- daveb: do you have verbose on?
- 18:28:12 [davb]
- I suspect so.
- 18:28:15 [davb]
- * davb checks
- 18:29:10 [davb]
- yeah, they are all on. I think its in a function, but the function. It shows the SQL for calling the function which is NOT over 16
- 18:29:12 [davb]
- brb
- 18:29:24 [abbaJ]
- abbaJ has joined #openacs
- 18:29:32 [davb]
- davb has quit
- 18:31:57 [ola]
- jerry: of course we care about aD, just not their license.
- 18:33:04 [jerryasher]
- Ah, well it's just not clear anymore that anyone would care about aD.
- 18:33:18 [jerryasher]
- Aside from gossip that is, they appear increasingly irrelevant.
- 18:33:24 [markd2]
- * markd2 doesn't care
- 18:35:03 [Spork]
- if you do return without any arguments it doesn't do anything right?
- 18:35:33 [ola]
- it just halts.
- 18:35:54 [Spork]
- hmm
- 18:35:58 [Spork]
- ok
- 18:36:01 [Spork]
- I don't get this then
- 18:36:10 [ola]
- ok
- 18:36:29 [markd2]
- in Tcl? return returns an empty string from the proc
- 18:36:30 [Spork]
- I need to retrieve an error
- 18:36:51 [Spork]
- in scotty tcl there's a %E that has the error
- 18:37:09 [Spork]
- I e-mailed Vlad (the person who wrote the nssnmp module) and he said he catches them directly
- 18:37:27 [Spork]
- He sent me a sniplet of code (as if he thinks I know exactly what it does):
- 18:37:36 [Spork]
- Usually i catch errors directly:
- 18:37:36 [Spork]
- if [catch {
- 18:37:36 [Spork]
- ns_snmp walk $fd [ns_mib oid ifTable] var {
- 18:37:36 [Spork]
- set oid [lindex $var 0]
- 18:37:36 [Spork]
- ...
- 18:37:37 [Spork]
- }
- 18:37:39 [Spork]
- } errmsg] {
- 18:37:41 [Spork]
- ns_log Error SNMP: $errmsg
- 18:37:43 [Spork]
- return -1
- 18:37:45 [Spork]
- }
- 18:37:57 [Spork]
- it looks like his program exits with a -1 code
- 18:38:04 [Spork]
- I need mine to keep running
- 18:38:22 [Spork]
- so I did errmsg] {
- 18:38:23 [Spork]
- }
- 18:38:27 [rbm]
- * rbm returns
- 18:38:36 [Spork]
- but it's returning the session id
- 18:38:56 [rbm]
- ola: insufficient karma?
- 18:39:19 [Spork]
- please insert 25 dogma to continue
- 18:39:21 [rbm]
- ola: are you sure it's a copy of CVS checked out via SSH and your olah user?
- 18:39:21 [ola]
- rbm: yessir.
- 18:40:39 [rbm]
- yes to both questions?
- 18:41:13 [ola]
- rbm: I think so. I have: export CVS_RSH=ssh andexport CVSROOT=olah@openacs.org:/cvsroot
- 18:41:57 [ola]
- rbm: do I need :ext:olah@openacs.org:/cvsroot
- 18:42:03 [ola]
- ?
- 18:43:12 [rbm]
- no. But did you checkout that way? Some people were trying to commit stuff on their anonimously-checked out cvs copies
- 18:44:00 [ola]
- oh, wait! maybe I need to check-out the empty "mp3-jukebox" ?
- 18:44:31 [rbm]
- Well, you need to update your cvs
- 18:44:38 [rbm]
- cvs update -PAd is what I do.
- 18:45:24 [ola]
- ok. lemme try...
- 18:51:37 [davb]
- davb has joined #openacs
- 18:53:24 [ola]
- rbm: I'm in /web/openacs4/packages when I issue: "cvs commit". after I add a message the commit is rejected.
- 18:54:46 [davb]
- try from inside mp3-jukebox
- 18:54:50 [rbm]
- have you updated?
- 18:55:06 [ola]
- yes
- 18:55:26 [rbm]
- ola: Could you 'cvs add' the files okay?
- 18:55:34 [ola]
- sure.
- 18:56:37 [ola]
- davb: I tried that too
- 18:58:28 [rbm]
- You can add, but not commit??!?!
- 18:58:30 [rbm]
- That is weird
- 18:58:43 [ola]
- ok. here's what I did now:
- 18:58:45 [ola]
- [ola@infogettable packages]$ cvs co mp3-jukebox
- 18:58:45 [ola]
- olah@openacs.org's password:
- 18:58:45 [ola]
- cvs server: cannot find module `mp3-jukebox' - ignored
- 18:58:45 [ola]
- cvs [checkout aborted]: cannot expand modules
- 18:58:49 [cdlu]
- [GlobalNotice] Services are down. They'll be up in a moment. Usual splitting, sorry.
- 18:59:13 [rbm]
- no, no, no
- 18:59:30 [ola]
- :-)
- 18:59:32 [rbm]
- You don't have to checkout the new module.
- 18:59:43 [rbm]
- The "module" is just a directory inside openacs-4.
- 18:59:48 [rbm]
- openacs-4 is the cvs module.
- 19:00:26 [davb]
- davb has quit
- 19:00:26 [hazmat]
- hazmat has quit
- 19:00:26 [ola]
- ola has quit
- 19:00:46 [ola]
- ola has joined #openacs
- 19:00:46 [hazmat]
- hazmat has joined #openacs
- 19:00:46 [davb]
- davb has joined #openacs
- 19:00:51 [rbm]
- I could commit just fine. I think you're doing something wrong with your cvs commands.
- 19:02:04 [ola]
- ok. roberto, did you commit "my" dir or just "cvs add" it?
- 19:02:04 [rbm]
- ola: you still there?
- 19:02:48 [rbm]
- I just added and committed, (and just removed) a file inside mp3-jukebox. So the dir is fine.
- 19:03:09 [ola]
- ok
- 19:03:17 [ola]
- hmm
- 19:03:39 [rbm]
- did the mp3-jukebox dir appeared under your packages dir when you updated it?
- 19:03:45 [rbm]
- does it have a CVS dir under it?
- 19:03:52 [rbm]
- s/appeared/appear/
- 19:04:12 [ola]
- lemme check
- 19:07:33 [ola]
- yes! there's a file, foo in there :-)
- 19:08:04 [ola]
- and a CVS dir!
- 19:08:23 [rbm]
- and your files are in there?
- 19:08:59 [markd2]
- and there's a pot of gold too!
- 19:08:59 [ola]
- no, I renamed the old dir first
- 19:09:05 [ola]
- heh
- 19:09:18 [rbm]
- then put your files in there (new one) and cvs add them
- 19:10:10 [ola]
- markd2: if there were a pot of gold in there I'd give it all to Roberto :-)
- 19:10:33 [vinod]
- vinod has joined #openacs
- 19:10:40 [ola]
- hi vinod!
- 19:10:50 [markd2]
- Vinodinator
- 19:11:19 [rbm]
- * rbm is forced to learn oriental patience as he installed Win2K in a P133
- 19:11:39 [rbm]
- ola: the gold would be very welcome :-)
- 19:11:54 [rbm]
- ola (and anyone): I take e-Gold and PayPal :)
- 19:12:01 [vinod]
- hey ola!
- 19:12:11 [vinod]
- hey all - makin copies...
- 19:13:21 [ola]
- of what?
- 19:14:14 [vinod]
- uhhh... nothin... just responding to markd2's comment (Saturday Night Live Reference)
- 19:15:24 [ola]
- haha. like shagster?
- 19:15:51 [vinod]
- the shagster. shagorama
- 19:16:04 [ola]
- I remenber that show. Rob Schneider or what was his name?
- 19:16:31 [vinod]
- yeah, that's it - wow, i didn't know that SNL had polluted other continents as well
- 19:17:03 [ola]
- I Loved Dieters dance party!
- 19:17:42 [vinod]
- haha - Mike Myers is hilarious
- 19:17:49 [markd2]
- Tonight on Sprockts, we Dahnse
- 19:17:56 [ola]
- hahaha
- 19:20:29 [vinod]
- hey markd2 - what happens in 45 days?
- 19:21:14 [markd2]
- no more job
- 19:21:33 [markd2]
- nobody can see the countdown I have on the whiteboard here
- 19:21:46 [markd2]
- like I had in my office at AOL
- 19:22:11 [vinod]
- cool - shackles come off in 45 days!
- 19:22:16 [markd2]
- yep
- 19:22:33 [markd2]
- and I'll be haaaapy when that happens
- 19:22:39 [vinod]
- markd2 unleashed!
- 19:23:07 [markd2]
- markd2 for unleashed dummies in 24 hours!
- 19:23:47 [vinod]
- can i get an autographed copy?
- 19:23:54 [vinod]
- (if there is more than one copy, that is)
- 19:23:57 [markd2]
- heh
- 19:24:01 [markd2]
- I'll get the clone bank right on it
- 19:36:37 [davb]
- whats wrong with this?
- 19:36:38 [davb]
- 32 v_folder_id := content_item__new(
- 19:36:38 [davb]
- 33 new__folder_id,
- 19:36:38 [davb]
- 34 new__name,
- 19:36:38 [davb]
- 35 new__parent_id,
- 19:36:38 [davb]
- 36 null,
- 19:36:40 [davb]
- 37 new__creation_date,
- 19:36:42 [davb]
- 38 new__creation_user,
- 19:36:44 [davb]
- 39 new__context_id,
- 19:36:46 [davb]
- 40 new__creation_ip,
- 19:36:48 [davb]
- 41 'f',
- 19:36:50 [davb]
- 42 'text/plain',
- 19:36:52 [davb]
- 43 null,
- 19:36:54 [davb]
- 44 'text',
- 19:36:56 [davb]
- 45 new__security_inherit_p,
- 19:36:58 [davb]
- 46 'CR_FILES',
- 19:37:00 [davb]
- 47 'content_folder',
- 19:37:02 [davb]
- 48 'content_folder');
- 19:37:04 [davb]
- postgresql says it has more than 16 params
- 19:38:31 [markd2]
- of by one in PG?
- 19:38:34 [markd2]
- er, off?
- 19:40:07 [davb]
- I think I am losing my mind.
- 19:42:09 [markd2]
- if you make a simple dummy function and give it 16 parameters, can you call it?
- 19:43:14 [davb]
- I think so. There are quite a few functions in the content-repository that have 16.
- 19:45:41 [vinod]
- is this a new version of content_item that you're creating?
- 19:46:44 [davb]
- Well I am just customizing the one I already created for security_inherit_p.
- 19:47:01 [davb]
- Mine has 14, I added item_type and item_subtype
- 19:47:09 [davb]
- s/has/had
- 19:47:11 [davb]
- not its 16
- 19:47:24 [davb]
- s/not/now
- 19:47:42 [davb]
- anyway creating a function that takes 16 parameters and calling it works.
- 19:47:47 [davb]
- So I screwed up somewhere.
- 19:48:20 [vinod]
- weird, weird stuff - what is the exact error msg that pg spits out?
- 19:49:19 [davb]
- [17/Oct/2001:15:58:01][943.38917][-conn11-] Notice: Querying '
- 19:49:19 [davb]
- select static_page__get_root_folder('2457');'
- 19:49:19 [davb]
- [17/Oct/2001:15:58:01][943.38917][-conn11-] Error: Ns_PgExec: result status: 7 \
- 19:49:19 [davb]
- message: ERROR: Cannot pass more than 16 arguments to a function
- 19:49:52 [davb]
- That calls static_page__folder_new which calls content_folder__new which calls content_item__new
- 19:50:00 [davb]
- which calls acs_object__new
- 19:51:38 [Spork]
- tcl supports threads?
- 19:52:12 [davb]
- in AOLserver
- 19:52:17 [Spork]
- oy
- 19:52:29 [Spork]
- I know nothing about threads
- 19:54:30 [markd2]
- the tcl in aolserver is thread-safe
- 19:54:40 [markd2]
- and there's an API for making your own threads as wel
- 19:54:48 [Spork]
- well, Vlad replied
- 19:54:55 [vinod]
- davb: and the function you posted above is from content_folder__new, right?
- 19:54:58 [Spork]
- He said to use threads
- 19:55:11 [davb]
- vinod, yes.
- 19:55:17 [Spork]
- ns_snmp doesn't support async request, if you need multiple reqiuests to be sent
- 19:55:18 [Spork]
- you can use threads like i do in our monitoring package.
- 19:55:18 [Spork]
- set threads [list]
- 19:55:18 [Spork]
- foreach host $hosts {
- 19:55:18 [Spork]
- lappend threads [ns_thread begin "nms::poll::group $host"]
- 19:55:18 [Spork]
- }
- 19:55:34 [Spork]
- I have no clue about nms::poll...bit
- 19:56:12 [davb]
- that is just a call to a procedure you don;t have. substitute whatever proc you want to call.
- 19:56:42 [davb]
- I wouldn't have this sort of problem with MySQL! :)
- 19:57:00 [vinod]
- davb: this is just a stab in the dark, but do you need to double quote your literals ('')?
- 19:57:15 [davb]
- They are, psql takes em out.
- 19:57:23 [vinod]
- got it
- 19:58:33 [Spork]
- dave, you talkin' to me about a procedure call?
- 19:58:39 [davb]
- I can't prove that function is the culprit though, because postgresql doesn't tell me which function is causing the problem.
- 19:58:43 [davb]
- spork, yeah
- 20:01:42 [ola]
- well, I finally comitted "mp3-jukebox". wow.
- 20:01:46 [vinod]
- davb: yeah, that's annoying - i guess i'd start putting RAISE NOTICE's all over the place to try to pin down where it's failing
- 20:01:58 [vinod]
- ola: congrats!
- 20:02:00 [davb]
- vinod: thanks!
- 20:02:10 [ola]
- vinod: thanks.
- 20:02:11 [markd2]
- woo hoo!
- 20:02:14 [ola]
- heh
- 20:02:14 [davb]
- vinod: now I remember that was my plan before we had to logoff
- 20:02:26 [davb]
- now comes 'the testing'
- 20:02:49 [vinod]
- haha - see you're not losing your mind, you just misplaced it when you logged off ;-)
- 20:03:47 [ola]
- so. on to webmail...:-)
- 20:03:58 [ola]
- just kidding.
- 20:04:21 [davb]
- rbm: we all heard him volunteer
- 20:04:26 [vinod]
- i heard it
- 20:04:34 [ola]
- nooo!
- 20:05:28 [vinod]
- davb: the other thing i might try is running that select sp_get_root_folder call(9457) directly in psql and see what happens... (maybe in a transaction, so you can roll it back if need be)
- 20:05:56 [davb]
- aha.
- 20:06:28 [davb]
- heh, it works
- 20:06:44 [davb]
- Must be something else. weird.
- 20:07:13 [jerryasher]
- jerryasher has quit
- 20:08:18 [davb]
- static_page__get_root_folder
- 20:08:18 [davb]
- ------------------------------
- 20:08:18 [davb]
- 2458
- 20:08:18 [davb]
- (1 row)
- 20:08:51 [davb]
- OK, weird.
- 20:08:55 [davb]
- Now it works fine.
- 20:09:03 [davb]
- from the web page also.
- 20:09:25 [davb]
- and the folder part works too, which was the original brokenness.
- 20:09:33 [vinod]
- good job :-)
- 20:09:43 [davb]
- yeah, but I don't know what I fixed.
- 20:09:57 [davb]
- or know if its in the .sql files so I can reload it.
- 20:11:45 [Spork]
- ok
- 20:13:30 [AaronSw]
- * AaronSw heads off
- 20:14:57 [AaronSw]
- * AaronSw returns
- 20:15:20 [vinod]
- wb AaronSw - how was your time away?
- 20:16:21 [Matt]
- [GlobalSpam] We're going to try and restart services. There'll be a few splits... nothing to worry about
- 20:16:27 [AaronSw]
- Pretty good thanks... had to reboot my TiVo
- 20:16:33 [davb]
- oops.
- 20:16:37 [AaronSw]
- Ahh, now it's back online again
- 20:16:38 [davb]
- I broke the CR
- 20:16:54 [vinod]
- TiVo! - lucky dog :-)
- 20:17:00 [vinod]
- davb: where?
- 20:17:16 [AaronSw]
- Yeah, I just installed the Ethernet card and webserver, so I'm having fun
- 20:17:36 [davb]
- probably content-folder or content-item.sql
- 20:17:49 [vinod]
- davb: in CVS? or locally
- 20:17:50 [davb]
- It just says Acs-content-repository not installed Error:
- 20:17:54 [davb]
- just mine.
- 20:18:53 [vinod]
- davb: yeah, the installer doesn't transmit errors well. you'll have to go into psql, run the drop script and then run the create script for a better error description
- 20:19:29 [vinod]
- AaronSw: you're running a webserver on your Tivo?
- 20:19:32 [AaronSw]
- Yep.
- 20:19:40 [vinod]
- publically accessible?
- 20:20:00 [vinod]
- so we can see what AaronSw is watching right now? :-)
- 20:20:04 [AaronSw]
- Well, now it is since my little brother wants to access it from school.
- 20:20:11 [AaronSw]
- But I'm worried about giving the address out.
- 20:20:14 [Spork]
- anyone got a good AOLServer threads primer/reference?
- 20:20:35 [AaronSw]
- I'll be attacked by a mass deluge of Buffy-watchers and it'll crash.
- 20:21:14 [vinod]
- AaronSw: haha. i'm totally jealous now, seeing as i have 5 channels (6 if you include the security cam channel)
- 20:21:33 [AaronSw]
- Haha. I heard that MIT's TV station was run off a tivo
- 20:21:41 [Spork]
- lol
- 20:23:36 [hazmat]
- hazmat has quit
- 20:23:36 [ola]
- ola has quit
- 20:23:36 [davb]
- davb has quit
- 20:23:58 [ola]
- ola has joined #openacs
- 20:23:58 [hazmat]
- hazmat has joined #openacs
- 20:23:58 [davb]
- davb has joined #openacs
- 20:23:59 [vinod]
- my call room at MIT has a TV that gets FOX and then about 20 annoying public access stations in various languages (fortunately, i'm usually too busy to watch it)
- 20:25:04 [Spork]
- anyone got a good AOLServer threads primer/reference?
- 20:25:08 [davb]
- Is there a fast way to stick -- in front of a selection in emacs?
- 20:25:49 [vinod]
- Spork: not sure if this is any help: http://aolserver.com/plweb-cgi/fastweb?state_id=1003350385&view=aolserver_docs_view&numhitsfound=164&query=thread&&docid=501&docdb=aolserver_tcldev_db&dbname=aolserver_admin_db&dbname=aolserver_tcl83_db&dbname=aolserver_tcl76_db&dbname=aolserver_cdev_db&dbname=aolserver_tcldev_db&dbname=aolserver_misc_db&operator=OR&TemplateName=predoc.tmpl&setCookie=1
- 20:26:00 [davb]
- or http://aolserver.com/docs/tcldev/tapi-139.htm#82563
- 20:26:07 [vinod]
- yeah, or that :-)
- 20:26:24 [davb]
- Its easier to do www.aolserver.com/docs than to serach
- 20:26:28 [davb]
- you get nice URLs
- 20:26:47 [Spork]
- i saw that
- 20:27:24 [Spork]
- I gotta figure out how to use it
- 20:28:15 [Spork]
- what should I look up in the index for ::
- 20:28:26 [davb]
- that is a namespace.
- 20:28:37 [davb]
- I suspect you don't need that.
- 20:29:17 [Spork]
- ok, this is what I need to do:
- 20:29:17 [vinod]
- davb: go to the beginning of the section that you want to comment. do M-x query-replace-regexp<RET>^<RET>--<RET>yyyyy (hit q when you want to stop commenting)
- 20:29:37 [davb]
- cool
- 20:29:40 [Spork]
- in tcl of course
- 20:29:52 [Spork]
- i have a mac address of a cable modem
- 20:30:07 [Spork]
- I have about 400 routers
- 20:30:32 [Spork]
- I need to send a request to each router asking it if it has that mac address of the cable modem
- 20:30:52 [Spork]
- now, 399 of those routers (technically - there can be a special case)
- 20:31:10 [Spork]
- will return "I don't have that modem" and 1 of them will say "Yep, got one here"
- 20:31:28 [davb]
- ouch
- 20:31:38 [Spork]
- now, ns_snmp does not have async way of polling them all
- 20:31:48 [Spork]
- which is what this script I'm porting does
- 20:31:59 [davb]
- vinod: can I do that in reverse?
- 20:32:04 [Spork]
- so, Vlad suggested I use threads
- 20:32:22 [Spork]
- but I have never done thread programming
- 20:32:36 [davb]
- aha.
- 20:32:56 [davb]
- I don't think you want to create 400 threads.
- 20:33:00 [Spork]
- so those 30 lines of the API for ns_thread does nothing
- 20:33:10 [davb]
- You need a proc that does them a few at a time, when one returns reuse it.
- 20:33:11 [Spork]
- Why is that?
- 20:33:36 [vinod]
- davb: hmmm... don't think that there is a query-replace-regexp-backwards
- 20:33:38 [Spork]
- well, in any case, what I want in the end is a list of routers that have the modem
- 20:33:43 [davb]
- heh
- 20:33:46 [davb]
- Right.
- 20:33:59 [vinod]
- davb: oh, do you mean removing the comments?
- 20:34:02 [Spork]
- because a technicians modem can change routers often
- 20:34:15 [davb]
- ok
- 20:34:41 [Spork]
- Any insight on how to do this threads business?
- 20:35:33 [davb]
- ns thread { wahatever proc you need to run}
- 20:35:44 [davb]
- then you have to do ns thread wait somewhere to get the results
- 20:36:05 [Spork]
- hmmm
- 20:36:31 [davb]
- or soemthing like that.
- 20:36:41 [davb]
- anyway good luck. Time for me to go.
- 20:36:44 [davb]
- davb has quit
- 20:38:25 [Spork]
- * Spork attempts to write his first tcl proc
- 20:42:15 [Spork]
- how bad is a thread
- 20:47:14 [AaronSw]
- * AaronSw heads off
- 20:47:29 [Spork]
- * Spork heads on
- 20:47:30 [Spork]
- :)
- 20:50:11 [AaronSw]
- * AaronSw returns
- 20:51:02 [Spork]
- * Spork backspaces
- 20:51:46 [AaronSw]
- Heh.
- 20:53:36 [Spork]
- arg
- 20:53:48 [Spork]
- I'm not smart enough to backwards engineer
- 20:55:09 [jerryasher]
- jerryasher has joined #openacs
- 20:55:44 [Spork]
- ok
- 20:55:52 [Spork]
- can someone tell me what this does:
- 20:55:54 [Spork]
- {
- 20:55:54 [Spork]
- global cmts_ip
- 20:55:54 [Spork]
- if {"%E" == "noError"} {
- 20:55:54 [Spork]
- set cmts_ip %A
- 20:55:54 [Spork]
- }
- 20:55:54 [Spork]
- %S destroy
- 20:56:06 [Spork]
- }
- 20:56:19 [Spork]
- is global cmts_ip a global variable declaration?
- 20:57:15 [vinod]
- vinod has quit
- 21:06:16 [markd2]
- markd2 has quit
- 21:06:59 [jerryasher]
- Hey spork, where is that snippet from?
- 21:07:29 [jerryasher]
- Yes, global cmts_ip is a global variable declaration, but I have no idea what the %S destroy
- 21:07:40 [jerryasher]
- is supposed to do. Is this tcl? tk? perl?
- 21:08:09 [Spork]
- ummm
- 21:08:09 [Spork]
- hehe
- 21:08:22 [Spork]
- $S destroy kills an SNMP session
- 21:08:29 [Spork]
- it's from scotty
- 21:09:03 [jerryasher]
- So is this within a page, or within a tcl proc?
- 21:10:15 [Spork]
- it's within a tcl page
- 21:10:23 [Spork]
- it's a tcl script
- 21:11:07 [jerryasher]
- I don't know what surrounds this block, but if this block is executed, than
- 21:11:44 [Spork]
- well
- 21:11:45 [jerryasher]
- If and only if, %E is noError, than the global variable cmts_ip is set in the tcl interp for that page,
- 21:12:01 [jerryasher]
- and no matter what the snmp session is killed.
- 21:12:01 [Spork]
- yeah
- 21:12:07 [rbm]
- moo moo
- 21:12:11 [Spork]
- oom oom
- 21:12:22 [jerryasher]
- you keep saying moo moo? What does that mean?
- 21:12:37 [Spork]
- It's what he likes to wear when nobody is around :)
- 21:12:46 [rbm]
- what's up?
- 21:13:12 [Spork]
- I tried doing what that sniplet does like this:
- 21:13:14 [Spork]
- proc ubr_poll {ubr_ip modem_dec} {
- 21:13:14 [Spork]
- set session [ns_snmp create $ubr_ip -community $cmts_community -timeout 5 -retries 3]
- 21:13:14 [jerryasher]
- Anyway, any filters or other pieces of code on that page can access the cmts_ip variable.
- 21:13:14 [Spork]
- global cmts_ip
- 21:13:14 [Spork]
- if [catch {
- 21:13:15 [rbm]
- jerryasher: 'moo' is is how one announces himself in undernet :)
- 21:13:16 [Spork]
- ns_snmp get $session [ns_mib oid cdxCmCpeType].$modem_dec]
- 21:13:18 [Spork]
- } errmsg] {
- 21:13:20 [Spork]
- }
- 21:13:22 [Spork]
- if $errmsg = ""
- 21:13:24 [Spork]
- set cmts_ip [ns_snmp config $session -address]
- 21:13:46 [Spork]
- }/me points out to Roberto that "bleeeeaat" is the new way
- 21:14:28 [jerryasher]
- Interesting. In the 60s I grew up a block away from an undernet then.
- 21:14:35 [Spork]
- Jerry, this is what my problem is (aside from not knowing threads)
- 21:14:48 [Spork]
- We have 267 routers
- 21:14:49 [jerryasher]
- They had great tours and free chocolate milk. (But lots of flies.)
- 21:15:05 [Spork]
- I have to find out on which one of those the modem resides on
- 21:15:19 [Spork]
- It can't be a serial process because it would take too long
- 21:15:26 [Spork]
- I was recommended threads
- 21:16:06 [Spork]
- So I'm trying to write a procedure that will check a ubr (router) for the modem and store the ubr ip address if it finds it
- 21:16:18 [Spork]
- otherwise I just want to kill the thread and move on
- 21:16:47 [ola]
- how the heck can you hear sounds in space?
- 21:16:52 [ola]
- this film, 2010 totally sucks compared to 2001!
- 21:17:11 [Spork]
- hey ola
- 21:17:20 [ola]
- hey
- 21:18:00 [rbm]
- ola: inside a space station, with air circulating :)
- 21:18:40 [jerryasher]
- well I don't know enough of what you are trying to do, but yes, the proc will set the global var cmts_ip to *something*
- 21:19:10 [ola]
- rbm: the commit went successfully!
- 21:20:12 [ola]
- (thanks to you!)
- 21:20:33 [Spork]
- yes but will it do it only when errmsg is empty?
- 21:21:09 [jerryasher]
- I don't think so. I assumed your typing was slightly inaccurate, but the if $errmsg ... looked wrong.
- 21:21:35 [jerryasher]
- Safely, it should be more like if {$errmsg == ""} { set cmts_ip ... }
- 21:21:46 [Spork]
- hmm
- 21:22:18 [Spork]
- ok
- 21:22:23 [Spork]
- what about the one above that
- 21:22:37 [Spork]
- I'm not very familiar with the catch methodology
- 21:22:59 [jerryasher]
- Anyway, just to follow up, that undernet was in the middle of the San Fernando Valley, about 1 mile from
- 21:23:06 [jerryasher]
- where the Saturn V Rockets were made.
- 21:23:27 [jerryasher]
- The catch doesn't look as though it has enough [s. Maybe it has one too many ].
- 21:23:48 [rbm]
- ola: good!
- 21:24:00 [Spork]
- yeah it did have one too many ]
- 21:24:09 [rbm]
- I hate the Tcl catch.
- 21:24:18 [rbm]
- It's not very catchy :)
- 21:24:24 [jerryasher]
- There were bleeeaats too. They were at an ag college about 1/2 mile away.
- 21:24:42 [jerryasher]
- I hate Tcl. The catch isn't bad. But the whole think reeks of LISP wannabe.
- 21:24:59 [Spork]
- lol
- 21:25:18 [Spork]
- well, here's my new and improved proc:
- 21:25:29 [Spork]
- (now with 50% more comments)
- 21:25:31 [Spork]
- proc ubr_poll {ubr_ip modem_dec} {
- 21:25:31 [Spork]
- set session [ns_snmp create $ubr_ip -community $cmts_community -timeout 5 -retries 3]
- 21:25:31 [Spork]
- global cmts_ip
- 21:25:32 [Spork]
- if [catch { [ns_snmp get $session [ns_mib oid cdxCmCpeType].$modem_dec] } errmsg] {
- 21:25:34 [Spork]
- #do nothing
- 21:25:40 [Spork]
- if {$errmsg = ""} {
- 21:25:44 [Spork]
- }
- 21:26:03 [Spork]
- eeep
- 21:26:09 [Spork]
- lol
- 21:26:14 [Spork]
- it stole a }
- 21:26:22 [Spork]
- * Spork yells at his irc client
- 21:26:29 [ola]
- heh
- 21:26:44 [Spork]
- proc ubr_poll {ubr_ip modem_dec} {
- 21:27:00 [Spork]
- set session [ns_snmp create $ubr_ip -community $cmts_community -timeout 5 -retries 3]
- 21:27:06 [Spork]
-
- 21:27:18 [Spork]
- global cmts_ip
- 21:27:26 [Spork]
- if [catch { [ns_snmp get $session [ns_mib oid cdxCmCpeType].$modem_dec] } errmsg] {
- 21:27:38 [Spork]
- }
- 21:27:40 [Spork]
-
- 21:27:54 [Spork]
- if {$errmsg = ""} {
- 21:28:00 [Spork]
- set cmts_ip [ns_snmp config $session -address]
- 21:28:05 [Spork]
- }
- 21:28:20 [Spork]
- now, I gotta figure out how to make that into a thread
- 21:28:30 [jerryasher]
- I would think that would basically work. However...
- 21:28:55 [jerryasher]
- Since this is a proc, you might, within the if block of the catch, which is executed
- 21:28:58 [Spork]
- * Spork dislikes all "however" "but" and "also"
- 21:29:00 [jerryasher]
- when there is an error,
- 21:29:14 [jerryasher]
- just "return"
- 21:29:21 [jerryasher]
- if {[catch ...]} {return}
- 21:29:31 [jerryasher]
- then you don't need the other if.
- 21:29:38 [Spork]
- instead of the #do nothing
- 21:29:50 [jerryasher]
- Also, I think you'll have problems with global and threads.
- 21:30:00 [Spork]
- how's that
- 21:30:02 [jerryasher]
- I would recommend using nsv_sets instead.
- 21:30:24 [jerryasher]
- it depends on you are trying to be global with. With another thread? I don't think that will work.
- 21:30:44 [Spork]
- no
- 21:30:46 [jerryasher]
- I *believe* that each thread will get it's own tcl interp. However, they may not. Also, they might. But....
- 21:30:47 [Spork]
- not thread
- 21:31:10 [Spork]
- I need to find out which ubr replied to the "let's find modem" thing
- 21:31:21 [Spork]
- and store its ip addr
- 21:31:32 [jerryasher]
- "Who" needs to find out? Which thread are they in?
- 21:31:50 [Spork]
- I think if I don't declare the global the var will be gone after the thread is destroyed
- 21:31:53 [jerryasher]
- Anyway, I often find that nsv_sets work as well as global and are much more thread friendly.
- 21:32:13 [Spork]
- Who is the script execution later on
- 21:32:16 [jerryasher]
- Yes, but after the thread is destroyed I would bet the global is gone too.
- 21:32:23 [Spork]
- ah
- 21:32:28 [Spork]
- so you recommend nsv_sets
- 21:32:59 [jerryasher]
- yeah. I have an old sample of using nsv_sets for threads laying around here somewhere. hold on
- 21:33:03 [jerryasher]
- I'll see if I can find it.
- 21:33:17 [Spork]
- cool
- 21:34:11 [Spork]
- you seem to know threads...how big of an impact is this: Opening about 300~400 threads at once
- 21:35:00 [jerryasher]
- I don't know about that, but it would seem to be INCREDIBLY HORRIBLY BAD. But I might be mistaken.
- 21:35:20 [Spork]
- well
- 21:35:36 [jerryasher]
- As an alternative, that I haven't looked into, you might try nsd's conds or events.
- 21:35:53 [Spork]
- well
- 21:35:57 [Spork]
- the script I am porting
- 21:35:59 [jerryasher]
- Or writing a C module that can use select() or poll() or other signals to do what you want.
- 21:36:06 [Spork]
- takes about 3-5 seconds to execute
- 21:36:25 [jerryasher]
- 3-5 seconds for 400 ubrs?
- 21:36:32 [Spork]
- 267
- 21:36:38 [Spork]
- 287 rather
- 21:36:42 [jerryasher]
- that's with threads or linear scan or?
- 21:36:49 [Spork]
- because it's using asynchronous communications
- 21:37:01 [Spork]
- it fires off a query to each router
- 21:37:18 [Spork]
- then waits and checks to see if the return of the query is an error or not
- 21:37:35 [Spork]
- if it's not an error, it takes the ip and stores it in that cmts_ip variable
- 21:38:12 [Spork]
- what I'm thinking is that a foreach ubr_in_ubrlist would actually not be firing 287 threads instantly
- 21:38:21 [Spork]
- because the loop takes some time
- 21:38:52 [Spork]
- So maybe it will launch 15-20 before the first one is done so it probably will only run that many threads at once
- 21:39:00 [Spork]
- the thread won't take long at all
- 21:39:06 [jerryasher]
- On linux?
- 21:39:12 [Spork]
- on SunOs
- 21:39:41 [jerryasher]
- Yeah, I dunno. I would hesitate. I think threads are smallish in general, but not that smallish.
- 21:39:50 [jerryasher]
- Also they stick around quite a while.
- 21:39:55 [Spork]
- hmmm
- 21:39:56 [jerryasher]
- You can experiment with a simple test.
- 21:40:14 [jerryasher]
- create the 300 threads however you want and see what happens to your machine.
- 21:40:17 [Spork]
- wassat?
- 21:40:23 [Spork]
- heh
- 21:40:24 [Spork]
- ok
- 21:40:36 [Spork]
- First I have to figure out how to make a thread :)
- 21:40:38 [jerryasher]
- Myself, I think I might try to restructure the problem.
- 21:40:39 [Spork]
- optimize it later
- 21:40:46 [jerryasher]
- begin $script
- 21:40:52 [jerryasher]
- I'm sorry:
- 21:41:00 [jerryasher]
- ns_thread begin $script (if I recall)
- 21:41:02 [Spork]
- ns_thread begin ubr_poll
- 21:41:44 [jerryasher]
- I would probably create a C routine, one that maybe runs in its own thread, that does this, using async i/o
- 21:42:14 [jerryasher]
- and a select statement or poll or what have you, that maintains an array of ubrs and what state they are in
- 21:42:35 [jerryasher]
- and when asked (via some tcl command), returns a list of failing ubrs. So called under ubrs.
- 21:42:37 [Spork]
- well, see, I don't know C
- 21:42:46 [Spork]
- well
- 21:42:47 [Spork]
- I do
- 21:42:58 [Spork]
- but not well enough to just write a C routine thing
- 21:43:00 [jerryasher]
- Ah, this is such a wonderful opportunity for you then!
- 21:43:11 [Spork]
- oh yes, I am sure my boss will love it
- 21:43:32 [Spork]
- Alternatively I can just run the tcl script we have now and parse it using regexps
- 21:44:20 [jerryasher]
- how often do you need this information to be updated?
- 21:44:50 [Spork]
- very often
- 21:44:58 [Spork]
- it's a tech support tool
- 21:45:10 [Spork]
- it's used to look up the info about a customer's modem
- 21:45:35 [jerryasher]
- What if you had 5 threads, or ten threads, each assigned 50 or 30 ubrs,
- 21:45:46 [jerryasher]
- each periodically making an snmp call to each.
- 21:46:03 [jerryasher]
- and all threads updating some nsv array
- 21:46:06 [jerryasher]
- with the state
- 21:46:07 [jerryasher]
- of
- 21:46:10 [jerryasher]
- each ubr
- 21:46:22 [Spork]
- because there's about 500,000 modems
- 21:46:30 [jerryasher]
- so the threads never exit.
- 21:46:35 [jerryasher]
- Oh, I thought there were 300 or so.
- 21:46:39 [Spork]
- no
- 21:46:44 [Spork]
- there's 300 or so routers
- 21:46:58 [Spork]
- but there's about 500,000/300 modems attached to each
- 21:47:52 [Spork]
- this problem is the key to my script
- 21:48:18 [Spork]
- being able to find out which ubr the modem is on under 10-15 seconds
- 21:48:49 [Spork]
- brb...going to find out how long something takes from my boss
- 21:53:16 [Spork]
- hmm
- 21:53:59 [Spork]
- they use a global in the aolserver docs too
- 21:56:07 [rbm]
- That's a PLS URL allright
- 21:56:19 [ola]
- good night people.
- 21:56:27 [ola]
- ola has quit
- 21:57:26 [jerryasher]
- Well maybe the global will work. The doc does suggest there is a problem if you wish to create many threads.
- 21:58:21 [Spork]
- they make 10
- 21:58:49 [jerryasher]
- 10 << 300!
- 21:59:18 [Spork]
- lol
- 22:00:34 [jerryasher]
- Well I apologize but I have to go fix my car window. It's been down and broken all summer,
- 22:00:52 [jerryasher]
- but now it's starting to get cool and my kids are complaining about the early morning trip to school
- 22:01:08 [jerryasher]
- Seems the wind is too cool and makes them wake up too soon.
- 22:01:49 [jerryasher]
- (um, I'm not sure how this is accepted here on openacs irc, but I am an independent consultant, and
- 22:01:50 [Spork]
- lol
- 22:02:01 [jerryasher]
- would be happy to code up a c module to address your needs....)
- 22:02:15 [Spork]
- interesting proposition
- 22:02:18 [jerryasher]
- gotta go right now though.
- 22:02:21 [jerryasher]
- bye.
- 22:02:22 [Spork]
- wait
- 22:02:24 [Spork]
- here
- 22:02:27 [Spork]
- nickb@cv.net
- 22:02:32 [jerryasher]
- got that.
- 22:02:33 [Spork]
- or nblyumbe@ic.sunysb.edu
- 22:02:43 [Spork]
- top - work
- 22:02:46 [Spork]
- bottom - home
- 22:02:52 [Spork]
- heh
- 22:03:03 [Spork]
- * Spork knows not to say real address or bills start coming
- 22:03:05 [Spork]
- :-D
- 22:03:19 [Spork]
- i'm on almost all the time
- 22:04:00 [jerryasher]
- bye.
- 22:04:03 [Spork]
- bye bye
- 22:04:04 [jerryasher]
- jerryasher has quit
- 22:04:05 [Spork]
- :)
- 22:05:55 [rbm]
- Spork is singing NSync now?
- 22:07:28 [Spork]
- no
- 22:07:35 [Spork]
- why would I>
- 22:14:50 [rbm]
- "bye bye bye"
- 22:16:01 [Spork]
- har har har
- 22:16:16 [Spork]
- so you think Jerry wants money for his module?
- 22:16:28 [rbm]
- * rbm shrugs
- 22:17:05 [Spork]
- i'm poor lol
- 22:17:40 [rbm]
- don't say that
- 22:18:53 [Spork]
- I am!
- 22:19:03 [Spork]
- I have like 400$ to my name
- 22:19:55 [rbm]
- so?
- 22:20:51 [Spork]
- so that's not exactly a multimillionare
- 22:23:43 [rbm]
- Poverty is much worse than that
- 22:24:11 [hazmat]
- hazmat has quit
- 22:31:18 [Spork]
- aha
- 22:31:29 [Spork]
- it should take ~1 second per thread to run
- 22:40:08 [Spork]
- go home time
- 22:40:12 [Spork]
- see ya all later
- 22:44:11 [davb]
- davb has joined #OpenACS
- 22:44:56 [davb]
- davb has quit
- 23:32:54 [jerryasher]
- jerryasher has joined #openacs
- 23:54:39 [davb]
- davb has joined #OpenACS