Linux-Development-Apps Digest #327, Volume #7 Wed, 11 Apr 01 05:13:08 EDT Contents: Development of Server in RedHat ("Julia Donawald") Re: How to detect memory leaks ? (Jem Berkes) Re: Urgent!!! gdm killed mysteriously? (Peter Teuben) Re: How to detect memory leaks ? (Chris) Re: Development of Server in RedHat ("Philip Van Hoof") workflow apps? (Harry George) Re: UML (Harry George) Re: dumping core on RH linux 6.2 (Victor Wagner) Re: makefile ("Stella") Re: Urgent!!! gdm killed mysteriously? ("Crystal Luo") MySQL en RH7 ("Patty van den Berg") Re: "Linux" Float Point Verification ("Albert Herman") Re: LILO ("Steven J. Hathaway") Re: Urgent!!! gdm killed mysteriously? ("Crystal Luo") Re: Development of Server in RedHat ("Julia Donawald") ---------------------------------------------------------------------------- From: "Julia Donawald" <[EMAIL PROTECTED]> Crossposted-To: comp.os.linux.development.system Subject: Development of Server in RedHat Date: Wed, 11 Apr 2001 02:31:13 +0200 Hi, till now I have only developed applications in Windows, but now I get more and more interested in Linux, so I have installed a RedHat 7.0 Linux Distribution on my PC. I now have to develope the following application and need therefore some information: 1.) How to develope an internet server tool, that means I want to create a program that receives data from a client through the internet. 2.) The data from the client I have to put in an mySQL Database. 3.) How can I make the server run all the time, when the linux-server starts. That means where can I find some samples or other information on these two problems. In fact I am also really interested, if this is a complex problem in linux and which libarys ( in C++ ) I could use to simplify my work. I know that I can search with some searchengines, but I am a really newbie in linux and so have no detailed idea for what to search exactly. Thanks a lot in advance Julia P.S. Sorry for my bad english ------------------------------ From: Jem Berkes <[EMAIL PROTECTED]> Subject: Re: How to detect memory leaks ? Date: Tue, 10 Apr 2001 19:46:15 -0500 > > Others will point you at various ways to do this, I > > expect, but there is a simple C++ approach using macros > > and placement new: (note that this code is not very > > tested ;) ) > > > > Chris, > > That's a good idea, thank you! I will try this out. This method works fine, as far as I have encountered. I use the same method for win32 programming (override new and delete operators), you can also log to a file each allocation/deallocation if you want. -- http://www.pc-tools.net/ DOS, Win32, Linux software ------------------------------ From: Peter Teuben <[EMAIL PROTECTED]> Subject: Re: Urgent!!! gdm killed mysteriously? Date: Tue, 10 Apr 2001 20:45:21 -0400 Don't forget there gdm is one of those programs that can cause your linux box be broken into by an outsider. Especially over the last few days I've noticed a lot of port 3879. I usually run a program called tcplog, which dumps messages like this: Apr 7 11:14:59 nemo tcplog: port 3879 connection attempt from 170.140.126.35 to my /var/log/messages file (redhat). Make sure your mysteriously dead gdm is not the result of a breakin and check your drives for funny files. peter Crystal Luo wrote: > > Hi, Eric. Thank you very much. > I booted with 'linux-up -s' as a single user then typed 'telinit 3', then I > logged in as root. When I keyed in the command 'startx', I got the following > message: > > _FontTransSocketUNIXConnect: Can't connect: errno = 111 > Failed to set default font path 'unix/:7100' > Fatal Server error: > could not open default font 'fixed' > X connection to :0.0 broken (explicit kill or server shutdown). > > Any idea on how to fix it? Thank you so much. > > Crystal > > ----- Original Message ----- > From: "Eric P. McCoy" <[EMAIL PROTECTED]> > Newsgroups: comp.os.linux.development.apps > Sent: Tuesday, April 10, 2001 1:39 PM > Subject: Re: Urgent!!! gdm killed mysteriously? > > > "Crystal Luo" <[EMAIL PROTECTED]> writes: > > > > > This is urgent! I can boot Linux Redhat 7.0 up to the level that I can > see > > > "MyComputerName: login. But then the gnome desktop won't be shown, and I > get > > > flickering screen and the message: > > > According to /var/run/gdm.pid, gdm was already running (xxxxpid), but > seems > > > to have been murdered mysteriously. > > > Possible to fix it? > > > > For now, boot into single-user mode and disable gdm (it's in your init > > scripts somewhere). Then go up to multi and figure out the problem > > for there. In particular, make sure X is properly configured - likely > > the X server is dying and gdm continually respawns it. > > > > -- > > Eric McCoy <[EMAIL PROTECTED]> > > "Knowing that a lot of people across the world with Geocities sites > > absolutely despise me is about the only thing that can add a positive > > spin to this situation." - Something Awful, 1/11/2001 > "Eric P. McCoy" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED]... ------------------------------ From: Chris <[EMAIL PROTECTED]> Subject: Re: How to detect memory leaks ? Date: Wed, 11 Apr 2001 01:02:30 +0000 Jem Berkes wrote: > > > > Others will point you at various ways to do this, I > > > expect, but there is a simple C++ approach using macros > > > and placement new: (note that this code is not very > > > tested ;) ) > > > [...] > > > > That's a good idea, thank you! I will try this out. > > This method works fine, as far as I have encountered. I use the same > method for win32 programming (override new and delete operators), you > can also log to a file each allocation/deallocation if you want. Yeah. This may have less overhead, depending on the application in question. It's also easier to implement in C (unless you happen to have a generalised tree data structure or equivalent lying around, which you may). Perl makes it extremely easy to analyse the data; I have used this exact strategy to good effect. -- Chris Lightfoot -- chris at ex dash parrot dot com -- www.ex-parrot.com/~chris/ ``Any person who knowingly causes a nuclear weapon test explosion or any other nuclear explosion is guilty of an offence....'' (Nuclear Explosions Act, 1998) ------------------------------ From: "Philip Van Hoof" <[EMAIL PROTECTED]> Subject: Re: Development of Server in RedHat Crossposted-To: comp.os.linux.development.system Reply-To: [EMAIL PROTECTED] Date: Wed, 11 Apr 2001 01:17:05 GMT > 1.) How to develope an internet server tool, that means I want to create > a program that receives data from a client through the internet. Check the subdir 'chapter14' of this tarbal ftp://ftp.wrox.com/beginning/2971.tar.gz And/or buy the book "beginning linux programming" > 2.) The > data from the client I have to put in an mySQL Database. Then maybe it's not even nessesairy to build a server application at all. With MySQL you can connect with the clients to any online server. Just make sure that the Host permission of the user who is going to connect to the MySQL server is set to % and port 3306 or 3307 (not sure) on the server is open (udp/tcp). You can use Kylix or Delphi using mysql.pas (search with google) and for kylix there are build in possibilities for working with mysql. Both are for rapid application development ofcourse. If you have more time :) and you want to build good applications you should start learning C and learn how to use the mysql API for C or .. C++ . You van find loads of information on API's for programming MySQL clients on mysql.com. If you are going to build a server application between the mysql server and the client then the server program will have to be programmed as client of the mysql server and as server for the actual client. Only difference is that the server must connect to the localhost mysqld .. So or you use : client -internet-> your server app -localhost-> mysqld or client -internet-> mysqld > 3.) How can I > make the server run all the time, when the linux-server starts. This depends on your distro .. for Redhat you have a dir called /etc/rc.d/rc$RUNLEVEL.d/ where $RUNLEVEL is a number from 0 to 6. If your redhat starts in X mode then this runlevel is 5. Else it's probably runlevel 2. Runlevel 1 is single mode (when you run LILO: linux single) and 6 is reboot and shutdown runlevel. Redhat will start all scripts that start with the letter S in that directory. in pseudo code this happens at bootup : a) get the runlevel from /etc/inittab and put it in #RUNLEVEL b) $MYLIST = `ls /etc/rc.d/rc$RUNLEVEL.d/S*` for each item in $MYLIST do exev $item start fi Now .. it's a bit more complicated .. In linux you have symlinks so the redhat folks made another dir called /etc/rc.d/init.d where all the possible scripts resist.. Redhat has some tools that allow you to manage the startup scripts using some gfx-gui/text-gui tools.. and to make this possible they use symlinks (well most distro's use it) this way : They symlink /etc/rc.d/rc2.d/S01something to /etc/rc.d/init.d/something if the script must be executed at startup ... and /etc/rc.d/rc2.d/K01something to /etc/rc.d/init.d/something if the script must not be executed but only showed in these tools.. A symlink is NOT like a shortcut in Windows.. well actually it is.. but its much more powerfull. It's a link to a file.. Know what.. Read the man page of ln :) "man ln" > That means where can I find some samples or other information on these > two problems. In fact I am also really interested, if this is a complex > problem in linux and which libarys ( in C++ ) I could use to simplify my So I suggest that you checkout mysql.com for API's to use with MySQL and programming languages like C and C++ 'or' kylix and Delphi depending how much time you get for this job. Kylix and Delphi == not much time to learn and to develop your application. And you can port Kylix and Delphi applications to and from windows/linux.. Also kylix is VERY new .. http://www.borland.com/kylix and still pretty expensive. ($1500). Or if you care more about the quality of the application.. I suggest that you learn C/C++ and the API's which you can fetch from mysql.com... > work. I know that I can search with some searchengines, but I am a > really newbie in linux and so have no detailed idea for what to search > exactly. > P.S. Sorry for my bad english P.S. Sorry for "my" bad english to :-) -- Philip van Hoof aka freax (http://www.freax.eu.org) irc: irc.openprojects.net mailto:freax @ pandora.be ------------------------------ From: Harry George <[EMAIL PROTECTED]> Subject: workflow apps? Date: 10 Apr 2001 19:02:00 -0700 Looking for workflow and maybe optimized scheduling apps (lower priority). Assume mixed *NIX, Win2k environment, with the main server running on *NIX and distributed tasks running on anything with spare cpu cycles. We have DQS and cron jobs and assorted scripts right now. Need to handle: a) fully automated task (e.g., just run a job) b) man-in-the-loop (someone has to setup and then kick off a job) c) manual (email to someone who emails back when done) Some kind of management mechanisms (e.g., status monitoring) via web. Alternatively, maybe someone knows the building blocks: How to set up a daemon on Win2K which can be triggered from *NIX. Searching google for these topics, I see openflow but not much info on that. Tips and pointers? ------------------------------ From: Harry George <[EMAIL PROTECTED]> Subject: Re: UML Date: 10 Apr 2001 19:07:45 -0700 Argo/UML is written in Java and a bit slow. However, it tries to be a full Rational Rose workalike. Tcm is very feature rich, but I think it is difficult to control the markups on lines (e.g., cardinality). My favorite right now is Dia. It can do all of UML, though a few pieces are a bit awkward (should improve in upcoming releases). Just does the diagrams themselves -- no underlying model repository. However, it exports in XML, so you could graft it onto a model repository. Charles Herman <[EMAIL PROTECTED]> writes: > What are the UML tools available for Linux. Along with a list of the > tools, I am looking for a description of the pros and cons of each tool. > > All information will be mightily appreciated. > > -charles ------------------------------ From: [EMAIL PROTECTED] (Victor Wagner) Subject: Re: dumping core on RH linux 6.2 Date: 10 Apr 2001 09:30:44 +0400 steve burkett <[EMAIL PROTECTED]> wrote: : i made a quick little test app that deferences a null pointer to test : out dumping core. : when i run the app, it gets a "segmentation fault", but no core, even : if i run the app as superuser (root). : why is my system not able to dump core? Becouse it is explicitely disallowed by system configuration. You can use ulimit command to turn it on. : i'm using RH Linux 6.2, g++ 2.95.2, gdb 5.0 -- Journalism will kill you, but it will keep you alive while you're at it. ------------------------------ From: "Stella" <[EMAIL PROTECTED]> Subject: Re: makefile Date: Tue, 10 Apr 2001 22:21:27 -0400 Thanks for your reply. Well, this source code I have is using predefines so that it can be compatible to all the platform. Unfortunately, previous developpers could not continue theier project and I do not have any documentation on how to compile or build. In addition, I'm new to Unix. :-( -Boo "Josef Moellers" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]... Boo Song wrote: > > I'm trying to modify a make file and getting error message saying > "make: *** No rule to make target `@V_ALL@', needed by `all'. Stop." > > I have @V_ALL@ but I don't know what @V_ALL@ is. > > I'm running this from my Linux machine. > I'm very new to makefile and linux. This looks pretty much like it's not a makefile proper but rather a template for configure. See if there's a "configure" script somewhere in the package and run that. -- Josef Möllers (Pinguinpfleger bei FSC) If failure had no penalty success would not be a prize -- T. Pratchett ------------------------------ From: "Crystal Luo" <[EMAIL PROTECTED]> Subject: Re: Urgent!!! gdm killed mysteriously? Date: Wed, 11 Apr 2001 13:17:24 +0800 Hi, thank you guys for your help. I've managed to solve the problem. My Xserver was down, I don't know why, don't remember I've made any changes. Anyway I've fixed it using Xconfigurator. Thank you again. br Crystal "Crystal Luo" <[EMAIL PROTECTED]> wrote in message news:9au464$94v$[EMAIL PROTECTED]... > Dear all, > > This is urgent! I can boot Linux Redhat 7.0 up to the level that I can see > "MyComputerName: login. But then the gnome desktop won't be shown, and I get > flickering screen and the message: > > According to /var/run/gdm.pid, gdm was already running (xxxxpid), but seems > to have been murdered mysteriously. > > Possible to fix it? > > I urgently need to do something on this platform. Please help me. Thank you > very much. > > Crystal > > > > ------------------------------ From: "Patty van den Berg" <[EMAIL PROTECTED]> Subject: MySQL en RH7 Date: Wed, 11 Apr 2001 07:50:05 +0200 Hi, I desperately wan't to develop some Internet-applications with PhP, Apache and MySql on Linux. I've installed the complete RH7 distribution, bought some nice books, eveything allright so far... But I've serious problems when trying to run MySQL-server. Does anybody know how to start this. Everything written in the install-section of the MySQL documentation on www.mysql.com isn't relevant to the RH7-mysql rpm's. The command "safe_mysqld..." always gives "MySQl server ended..." (in responf to cannot connect to local MySql-server through socket..." Any clues??? Thanks, Tom Neijman ------------------------------ From: "Albert Herman" <[EMAIL PROTECTED]> Subject: Re: "Linux" Float Point Verification Date: Tue, 10 Apr 2001 21:51:41 -0700 Reply-To: "Albert Herman" <[EMAIL PROTECTED]> Take a look at http://www.theregister.co.uk/content/2/18102.html for details. My CIO passed it on to me, so I don't know anymore than what I read there. Albert. "Raymond Toy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]... > >>>>> "Albert" == Albert Herman <[EMAIL PROTECTED]> writes: > > Albert> My companies management is more than a bit nervous about using Linux for > Albert> floating point computational purposes. I'm working to mitigate their > Albert> concerns. I plan to port to Solaris/Sparc (know about SparcIII problems) to > > What Sparc III problems are you talking about here? > > I'm curious. > > Ray ------------------------------ Date: Tue, 10 Apr 2001 22:13:26 -0800 From: "Steven J. Hathaway" <[EMAIL PROTECTED]> Crossposted-To: comp.os.linux.development.system Subject: Re: LILO > With SCSI, the bootstrap hardware BIOSes usually look for SCSI drives jumpered to unit 0 or unit 1 on the first SCSI controller. Your message indicates that your disk is jumpered as unit 3. On development systems,I have had success placing a LILO boot loader and some system images on a small partition on the first bootable drive known to the BIOSes of the computer. Then, if I wish to chain to another LILO boot image on another disk drive or even a logical drive in an extended partition, it is doable. This is complex, but can facilitate development platform boot activities. Sincerely, Steven J. Hathaway ------------------------------ From: "Crystal Luo" <[EMAIL PROTECTED]> Subject: Re: Urgent!!! gdm killed mysteriously? Date: Wed, 11 Apr 2001 16:13:43 +0800 Hi, thank you very much. I've managed to solve the problem. X server was down, I still don't know why. I reconfigured X using Xconfigurator. Anyway thank you very much for your help. br, Crystal ------------------------------ From: "Julia Donawald" <[EMAIL PROTECTED]> Crossposted-To: comp.os.linux.development.system Subject: Re: Development of Server in RedHat Date: Wed, 11 Apr 2001 11:06:39 +0200 Hi, thanks a lot for your answer. I have already experience in C/C++ in Windows systems but none in Delphi, would you than think it will be better (in my case faster ) to develope in C++ or in Delphi or Kylix? "Philip Van Hoof" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:lgOA6.30663$[EMAIL PROTECTED]... > > 1.) How to develope an internet server tool, that means I want to create > > a program that receives data from a client through the internet. > > Check the subdir 'chapter14' of this tarbal > ftp://ftp.wrox.com/beginning/2971.tar.gz > And/or buy the book "beginning linux programming" > > > 2.) The > > data from the client I have to put in an mySQL Database. > > Then maybe it's not even nessesairy to build a server application > at all. With MySQL you can connect with the clients to any > online server. Just make sure that the Host permission of the > user who is going to connect to the MySQL server is set to % > and port 3306 or 3307 (not sure) on the server is open (udp/tcp). > > You can use Kylix or Delphi using mysql.pas (search with google) > and for kylix there are build in possibilities for working > with mysql. Both are for rapid application development ofcourse. > If you have more time :) and you want to build good applications > you should start learning C and learn how to use the mysql > API for C or .. C++ . You van find loads of information on > API's for programming MySQL clients on mysql.com. If you are > going to build a server application between the mysql server > and the client then the server program will have to be > programmed as client of the mysql server and as server for > the actual client. Only difference is that the server must > connect to the localhost mysqld .. > > So > > or you use : > > client -internet-> your server app -localhost-> mysqld > > or > > client -internet-> mysqld > > > > 3.) How can I > > make the server run all the time, when the linux-server starts. > > This depends on your distro .. > for Redhat you have a dir called > /etc/rc.d/rc$RUNLEVEL.d/ > where $RUNLEVEL is a number from 0 to 6. If your redhat > starts in X mode then this runlevel is 5. Else it's > probably runlevel 2. Runlevel 1 is single mode (when you > run LILO: linux single) and 6 is reboot and shutdown > runlevel. Redhat will start all scripts that start with > the letter S in that directory. > > in pseudo code this happens at bootup : > > a) get the runlevel from /etc/inittab and put it in #RUNLEVEL > b) > $MYLIST = `ls /etc/rc.d/rc$RUNLEVEL.d/S*` > for each item in $MYLIST > do > exev $item start > fi > > Now .. it's a bit more complicated .. > > In linux you have symlinks so the redhat folks made another dir > called /etc/rc.d/init.d where all the possible scripts resist.. > Redhat has some tools that allow you to manage the startup > scripts using some gfx-gui/text-gui tools.. and to make this > possible they use symlinks (well most distro's use it) this way : > > They symlink > /etc/rc.d/rc2.d/S01something to /etc/rc.d/init.d/something > if the script must be executed at startup ... and > /etc/rc.d/rc2.d/K01something to /etc/rc.d/init.d/something > if the script must not be executed but only showed in these > tools.. > > A symlink is NOT like a shortcut in Windows.. well actually > it is.. but its much more powerfull. It's a link to a file.. > Know what.. Read the man page of ln :) "man ln" > > > That means where can I find some samples or other information on these > > two problems. In fact I am also really interested, if this is a complex > > problem in linux and which libarys ( in C++ ) I could use to simplify my > > So I suggest that you checkout mysql.com for API's to use with MySQL > and programming languages like C and C++ 'or' kylix and Delphi depending > how much time you get for this job. Kylix and Delphi == not much > time to learn and to develop your application. And you can port > Kylix and Delphi applications to and from windows/linux.. Also kylix > is VERY new .. http://www.borland.com/kylix and still pretty > expensive. ($1500). Or if you care more about the quality of the > application.. I suggest that you learn C/C++ and the API's which you > can fetch from mysql.com... > > > work. I know that I can search with some searchengines, but I am a > > really newbie in linux and so have no detailed idea for what to search > > exactly. > > > > > P.S. Sorry for my bad english > > P.S. Sorry for "my" bad english to :-) > > > -- > Philip van Hoof aka freax (http://www.freax.eu.org) > irc: irc.openprojects.net mailto:freax @ pandora.be ------------------------------ ** FOR YOUR REFERENCE ** The service address, to which questions about the list itself and requests to be added to or deleted from it should be directed, is: Internet: [EMAIL PROTECTED] You can send mail to the entire list by posting to the comp.os.linux.development.apps newsgroup. Linux may be obtained via one of these FTP sites: ftp.funet.fi pub/Linux tsx-11.mit.edu pub/linux sunsite.unc.edu pub/Linux End of Linux-Development-Apps Digest ******************************