Jump to content

freghar

Members
  • Posts

    461
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by freghar

  1. Well while it surely depends on HW capabilities, so a 60GHz (yes, 60) CPU and a few TBs of RAM could hold many thousands of players. Except that nobody can make a 60GHz CPU that doesn't burn itself several milliseconds after it's startup. That's where multiple cores come in, but AFAIK mangos isn't really well optimized to run on a multicore system. So yes, I'd imagine 4500 is possible, but with some sort of a multithread patch.
  2. iptables -t nat -A PREROUTING -p tcp -m tcp --dport 8079 -j REDIRECT --to-ports 8085 iptables -t nat -A PREROUTING -p tcp -m tcp --dport 8099 -j REDIRECT --to-ports 8085
  3. Well, first, it's a comparison against glibc 2.3 from 2002-2003, current glibc is 2.9 (2009-2010). Second - using LD_PRELOAD is not "compilation". It's just a dynamic linking. When you compile a "dynamic executable", you can't run it alone. When you double click it (or launch some other way), a special program called "loader" is launched (/lib/ld*.so). This loader loads things like libc (glibc), libdl, libcrypt and all the libraries the binary was "soft linked" with (by the compiler at compilation time) and does the actual linking at runtime. An example list (for mangos-worldd) follows: $ ldd /opt/mangos/bin/mangos-worldd linux-vdso.so.1 => (0x00007fff217ff000) libACE-5.6.6.so => /opt/mangos/lib/libACE-5.6.6.so (0x00007f10aaa8b000) libmysqlclient_r.so.16 => /usr/lib/libmysqlclient_r.so.16 (0x00007f10aa65f000) libz.so.1 => /usr/lib/libz.so.1 (0x00007f10aa447000) libssl.so.0.9.8 => /usr/lib/libssl.so.0.9.8 (0x00007f10aa1f2000) libcrypto.so.0.9.8 => /usr/lib/libcrypto.so.0.9.8 (0x00007f10a9e51000) libtbb.so.2 => /opt/mangos/lib/libtbb.so.2 (0x00007f10a9c2a000) libtbbmalloc.so.2 => /opt/mangos/lib/libtbbmalloc.so.2 (0x00007f10a9a14000) libmangosscript.so.0 => /opt/mangos/lib/libmangosscript.so.0 (0x00007f10a980c000) libpthread.so.0 => /lib/libpthread.so.0 (0x00007f10a95ef000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f10a92db000) libm.so.6 => /lib/libm.so.6 (0x00007f10a9059000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f10a8e42000) libc.so.6 => /lib/libc.so.6 (0x00007f10a8ae1000) libdl.so.2 => /lib/libdl.so.2 (0x00007f10a88dd000) librt.so.1 => /lib/librt.so.1 (0x00007f10a86d4000) libcrypt.so.1 => /lib/libcrypt.so.1 (0x00007f10a849d000) libnsl.so.1 => /lib/libnsl.so.1 (0x00007f10a8285000) /lib64/ld-linux-x86-64.so.2 (0x00007f10aae56000) So the trick with LD_PRELOAD is in adding another library to this list, making it override already defined functions. This way you can force any application to use a network proxy by changing it's network stack (google for proxychains), use chroot as normal user (google for fakechroot) and do many other things like using libtcmalloc, if it's really that faster and doesn't break your application.
  4. The problem with precompiled headers in GCC is either * in the g++ itself (well, it's optimization), since almost nobody uses precompiled headers on *nix * in the mangos build system (hosed automake build system / messed up dependencies) * in the precompiled headers automake patch (I know, it's maybe the one made by me with performance gain like 5-7%) Another way to speed up build process is to avoid using superlarge .h files (Player.h, Unit.h, ...) and split those, along with the .cpp files itself, into many smaller parts, so other .cpp files can include only the parts they're interested in. This actually saves quite a lot of time (at least on a C project using gcc, but - in theory - all compilers should benefit).
  5. They drop and crecreate tables, the structure seems to be the same what mangos currently uses, so cleaner way for those two SQL snippets looks like -- TRUNCATE TABLE instance; TRUNCATE TABLE instance_reset; TRUNCATE TABLE character_instance;
  6. I googled a bit and found http://img248.imageshack.us/img248/1940/eclipsedarkgilouchethem.png which seems to have white font on panels, but still a black font on light gray as "text" GTK2 class. Which means you probably have your "text" and "base" colors set to dark on light. My heavily customized theme looks like http://img829.imageshack.us/img829/8202/screenshot2010073110151.png (a bit large indeed, but this is a smaller 15.4" laptop with rather high resolution). Well I didn't wanted to waste your time with screenshots, but since you can't reproduce the issue, I'll do so. http://img39.imageshack.us/img39/1997/screenshot2010073110211.png -- Gmail - as mentioned - uses colorless input fields, making my firefox select system colors quick reply: http://img210.imageshack.us/img210/4351/screenshot2010073110220.png http://img836.imageshack.us/img836/8486/screenshot2010073110222.png search (applies also to advanced search page): http://img20.imageshack.us/img20/2550/screenshot2010073110230.png http://img834.imageshack.us/img834/2794/screenshot2010073110231.png classic "advanced" post view: http://img534.imageshack.us/img534/2082/screenshot2010073110235.png http://img641.imageshack.us/img641/766/screenshot2010073110241.png http://img707.imageshack.us/img707/4021/screenshot2010073110242.png the same thing applies to selection and combo boxes, like language selection on the bottom - or even advanced search selection fields http://img33.imageshack.us/img33/4048/screenshot2010073110473.png I guess that's enough screenshots - some elements like checkboxes are fine as they probably have no color / style specifications.
  7. Dear forum administration group (or just TheLuda), I'd like to point out a pretty annoying forum color issue. I use a dark GTK theme on my system, which means all GTK+/GTK2 apps are nicely colored to my needs. Even most websites work fine with their default look, but some tend to have several attributes defined and others undefined. Most doesn't care, because it looks okay on common MS Windows systems under default color scheme, but - for the sake of clean design - it should be taken care of. The problem is in default system font vs. white background in "post new reply" and other textareas. In which case I get my default system font (white) on white/semi-white background. One way is to simply set font to be black (explicitly) or do it like gmail - leave textareas unstyled, in which case I get black background and white text. Either way works for me. Thanks, freghar
  8. Upstart has nothing to do with Cron. AFAIK it's only Ubuntu's replacement of sysv startup mechanism, no daemon, nothing that can restart mangos. Anyway I don't really see the point in making things ugly. Why the hell has somebody EVER came with the idea to use cron as mangos restarter? It's totally ... ahem. Imagine it has to run every minute just to check if mangos is running or not, it has to match against some binary name in process list, in a rare case it could launch mangos 2 or more times! Much simplier solution is to use a wrapper script with infinite loop, similar to what others posted, not only it can restart your mangos immediately (and not after 1-60 seconds), it can easily even check for it's return value (if it's 0 or 1, ie. shutdown or error, then don't restart). Furthermore it's a lot cleaner, since it doesn't have to check every minute for running mangos and it's binary-name-safe, so if some other user starts "cat" masked as "mangos-worldd" 20 times, it won't ever confuse your restarter, because it doesn't care about processes, it doesn't need to retrieve process list from the kernel. Also it's worthless to make restarters for realmd as it (from my experience) never crashes. edit: I admit I haven't properlz read all those posts above. Last time I checked Upstart (some years ago) it was just a paralell startup script system. If it's daemon now (that can restart services upon crash), it's at least as good as cron (if it *just* checks processes periodically). The basic loop script can be easily used when you need to run multiple mangos+realmd pairs, you don't even have to rename them as each restarter takes care of it's one server. An example: #!/bin/sh while true do ./mangos-worldd [ $? < 2 ] && exit 1 sleep 5 done; This is a very simple and clean (doesn't waste any unnecessary resources) restarter that exits when you .server shutdown your server (instead of restarting it) and when some error occurs (ie. DBCs out of date), so it won't meaninglessly start and error down all the time. Save this script as restarter.sh in the directory where mangos-worldd is, make it executable (chmod +x restarter.sh) and fire up a screen session using this script, ie. "screen -d -m -S mangosd ./restarter.sh". That's all.
  9. Well that's not strict. I'm aware of ASM-only GUI which is a few KBs in size (it's in fact a mini OS) and is about 50 times faster than bash in linux. Furthermore, the performance hit made by xserver is rather low, so if you run, say, fluxbox on Xorg, the performance hit is going to be much lower compared to KDE/Gnome and their tons of services. ... and I personally find bash / zsh shell more user-friendly than most GUIs, so ... Well that depends. C-like languages treat conditions as "if (true && true && true ...)" while bash does the opposite: "0 && 0 && 0 && ..." because 0 return value == no error. So it's really server && (user friendly || performance) C-wise
  10. Point 3) can be easily solved by logout+login after learning that language, at least for a GM character.
  11. Seriously. How many people have a chance to answer or even read your question in 78 minutes around 3AM? Leave 0.0.0.0 in the config.
  12. Well if the entire OS has frozen, it means (on windows) some heavy kernel I/O involved (or waiting for that I/O). My best guess is world.log logfile enabled.
  13. Well ... AFAIK mangos uses SOAP only to execute commands on the console, so it can do pretty much everything you can do via RA/console.
  14. Debian Squeeze (6.0, current testing) or something similar (fedora, archlinux, ...) Avoid desktop distros (Ubuntu - way too much crap running) and production-stable servers (Centos - old & stable, not the best choice for bleeding-edge mangos).
  15. Now you can post it under patches -> under review (if you think it's correct enough) as this forum section is about "Installation, Configuration & Upgrades" of the server itself (by end users), not for "data upgrades".
  16. Sticky "[Guide] Updating for Windows" in this forum section. Updating for linux should be very similar and maybe it even exists somewhere on the wiki.
  17. I have never worked with erlang, but have done quite a few things in haskell. For that reason, I thought erlang is one of the 10000+ language forks and the first sentence in the first post sounded like "hey! this erlang looks cool, let's rewrite everything to erlang!". As some people have little-to-none brain processing power, such threads also appear and I thought this is just another of them. If you mean it seriously, please accept my apology, I don't know any person who often works with functional languages and it's interested in mangos development at the same time. I've never worked with CUDA on the programming level, but doesn't CUDA need newer nvidia card? Can it be emulated for systems with no graphic card (ie. servers)?
  18. No, "UNIX Diff", it's under "D" rather than "U" there. http://paste2.org/p/872691
  19. It's not about learning, unified diff/patch is much easier to "read" for *real* developers than "replace that by this". Furthermore, there's no learning involved in the latter one, people just spend more time applying it, but that's all. They mostly don't even understand what the code does.
  20. Theluda used to make up the funny names and he (mostly) isn't around here anymore
  21. I always thought I could run realmd on another machine with a separate database.
  22. Actually, I believe it's one byte off. I've written a small C prog for this long time ago and AFAIK it's value always worked with this SUBSTRING_INDEX thing. #include <stdio.h> #include "UpdateFields.h" #define TARGET PLAYER__FIELD_KNOWN_TITLES int main(void) { printf("%#lx (%lu)\\n", TARGET+1, TARGET+1); return 0; } (edit the TARGET to your needs + put 0.12 UpdateFields.h into the *current* directory) The key thing here is probably TARGET+1, which returns 925 for me, so try that one.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use