Re: [SLE] schemaSpy
by Randall R Schulz
On Saturday 03 December 2005 13:17, Phil Burness wrote:
> On Saturday 03 December 2005 17:23, Randall R Schulz wrote:
> > Phil,
> >
> > On Saturday 03 December 2005 08:28, Phil Burness wrote:
> > > On Saturday 03 December 2005 16:06, Randall R Schulz wrote:
> > > > ...
> > > >
> > > > For starters, why don't you state the specific invocation you
> > > > used?
> > > >
> > > > > Phil
> > > >
> > > > Randall Schulz
> > >
> > > My specific invocation was :-
> > > java
> > > -cp
> > > /home/pburness/mysql-connector-java-3.0.17/mysql-connector-java-3
> > >.0.1 7-ga-bin.jar -jar schemaSpy_2.1.0.jar -t mysql -db tract -o
> > > library -u phil -p xxxx -host localhost -s mysql -all
> > >
> > > I notice your using a different version of connector - I tried
> > > 3.1.12 and that didn't work either. Did you get the 3.1.11 from
> > > the mysql website?
> >
> > Yes. I guess 3.1.12 came out some time in the past few weeks, since
> > the time I downloaded it. I have applications that require at least
> > 3.1.11.
> >
> >
> > It appears there are unstated requirements on the order of the
> > various options. When I copied the sample invocation from the Web
> > page and modified it for MySQL and my local setup, I got the same
> > symptom you reported:
> >
> > -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
> > Failed to load driver [com.mysql.jdbc.Driver] from classpath []
> >
> > Use -t [databaseType] to specify what drivers to use
> > or modify one of the .properties from the jar, put it on your file
> > system and point to it with -t [databasePropertiesFile].
> >
> > For many people it's easiest to use the -cp option to directly
> > specify where the database drivers exist (usually in a .jar or
> > .zip/.Z).
> >
> > java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
> > at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> > at java.security.AccessController.doPrivileged(Native
> > Method) at
> > java.net.URLClassLoader.findClass(URLClassLoader.java:188) at
> > java.lang.ClassLoader.loadClass(ClassLoader.java:306) at
> > java.lang.ClassLoader.loadClass(ClassLoader.java:251) at
> > java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at
> > java.lang.Class.forName0(Native Method)
> > at java.lang.Class.forName(Class.java:242)
> > at
> > net.sourceforge.schemaspy.Main.getConnection(Main.java:429) at
> > net.sourceforge.schemaspy.Main.main(Main.java:122)
> > -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
> >
> > I verified that the class being loaded does exist in my Connector/J
> > JAR file:
> >
> > % jar tf .../mysql-connector-java-3.1.11-bin.jar |egrep Driver
> > com/mysql/jdbc/Driver.class
> > com/mysql/jdbc/NonRegisteringDriver.class
> > com/mysql/jdbc/NonRegisteringReplicationDriver.class
> > com/mysql/jdbc/ReplicationDriver.class
> > org/gjt/mm/mysql/Driver.class
> >
> >
> > I'm a bit puzzled by the "classpath []" in the diagnostic. I wonder
> > how the program is discovering the class path and why it does not
> > reflect the actual invocation.
> >
> >
> > Waaait a minute. I see the confusion. The "-cp" is an argument to
> > schemaSpy, not to the JVM (the author chose the same option, which
> > I'd consider a bad choice, insofar as it confuses weak minds such
> > as my own).
> >
> > Yup. Giving the -cp .../mysql-connector-java-3.1.11-bin.jar option
> > allows it to load the driver. Now it seems to hang here:
> >
> > -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
> > Using database properties:
> >
> > [/acquisitions/schemaSpy_2.1.0.jar]/net/sourceforge/schemaspy/dbTyp
> >es/mysql .properties Connected to MySQL - 4.1.13-Max-log
> >
> > Gathering schema details........
> > -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
> >
> > At this point there's no CPU utilization and MySQL is not running
> > any queries on behalf of schemaSpy (ascertained by logging in to
> > MySQL on another shell and using the "show full processlist"
> > command).
> >
> > SchemaSpy produced a skeleton directory structure in the output
> > directory I specified:
> >
> > % find mylocal
> > mylocal
> > mylocal/tables
> > mylocal/graphs
> > mylocal/graphs/summary
> >
> >
> > By the way, I extracted the MySQL configuration file from the
> > schemaSpy JAR file:
> >
> > % jar xf \
> > schemaSpy_2.1.0.jar \
> > net/sourceforge/schemaspy/dbTypes/mysql.properties
> >
> > % mv net/sourceforge/schemaspy/dbTypes/mysql.properties .
> >
> > % egrep driverPath mysql.properties
> > driverPath=c:/mysql/mysql-connector-java-3.1.8-bin.jar
> >
> > I think this is where the driver is loaded from if you don't
> > override it with the -cp option. You can put a corrected
> > "mysql.properties" file in the invocation directory if you don't
> > want to include the -cp option. Since I just make cover scripts for
> > such things, it's easier for me to include the -cp option there
> > than it is to have a properties file.
> >
> >
> > Good luck. Let me know if you can get farther than I did.
>
> Randall - I haven't a chance!
>
> Interested to read through your notes but I'm not good with Java and
> don't know how to proceed....
Sorry. It's actually simple enough, if you cut to the chase instead of
getting the blow-by-blow that I gave you.
Try this: Create an "sspy" script (be sure to "chmod +x sspy"):
-==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
#!/bin/bash --norc
classPath="/usr/share/java/mysql-connector-java.jar"
export CLASSPATH="$classPath"
exec \
java \
-jar /acquisitions/schemaSpy_2.1.0.jar \
-t mysql \
-cp "$classPath" \
"$@"
-==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
(For whatever funky reason, you need the Connector/J JAR both in the
Java class path _and_ in the -cp argument to schemaSpy itself.)
Be sure to correct the path names for your system.
Based on my experience, I recommend you use 3.1.12 of Connector/J. The
one you have should be OK or you can install the latest
mysql-connector-java package from the Packman repository
(mysql-connector-java-3.1.12-0.pm.0).
If you want to see the pretty graphical database diagrams, install this
RPM:
<http://www.graphviz.org/pub/graphviz/ARCHIVE/graphviz-2.6-1.fc4.i386.rpm>
Now invoke it like this:
% sspy -db tract -o library -u phil -p X -host localhost -s mysql -all
That should do it.
Again, good luck. If you still have problems, feel free to report back.
> Phil
Randall Schulz
19 years, 1 month
Re: [opensuse] Re: Mac TimeMachine like backup for Linux? - Becoming a Little OT -
by LLLActive@GMX.Net
*This Reply from / Antwort von / Antwoord van:* LLLActive(a)GMX.Net -
2011-06-12 - 13:53:59 -0700
Hi Linda,
I am very tempted to respond to your ideas, because I as engineer in
broadcasting and since 1980 using information technology, constantly
came up against the purists and the belief that the engineer knows what
the user needs. That is also what a user gets from the bad engineer. As
you say, apps are made or are left by the wayside, depending on
usability. Only a few users and specialists can and prefer to use
command line environments, me too on servers, but most users prefer a
good simple effective GUI. I used a lot of scripts for backups with tar
and dar, but enjoyed the ease of scanning backups and restore files with
a GUI like KDar, and as the thread started, Mac's TimeMachine. This is
also the success of Macs. My son is a media designer. He and all his
friends have Mac's just because of the successful Mac OSX GUI's. (The
reason I got a Mac was that one of them got herself a new Macbook Pro,
and they all bought the old Macbook and gave it to me for my 55th). Let
most Mac apps be propriety if Apple pleases (which I also find
nausiating); but I can dig behind it into the Darwin kernel Linux world
and do 95% of the stuff I have on opensource Linux with the development
environment and MacPorts. I also have Sun's VirtualBox (now Oracle :-((
) with openSuSE 11.4 and Win7 on the upgraded old white Macbook with 4GB
memory and 500GB HDD; all nicely backed up by TimeMachine on an external
USB 500GB 2,5" drive. The reason that most media specialists go for Mac,
is it's usability, and the loss for Linux apps that can do all the stuff
a Mac does, but only if you are a geek.
In the end I think we should not become too religious about the pro and
cons of GUI's - just making the power of Linux available also to
non-geeks will help Linux to become the most powerful tool in modern
telecom/information systems. Mac's file system is for instance a serious
drawback, and its incompatibility with modern Linux (*nix) file systems
frustrates me often when my data is on a ext4 file system for example. I
hate using fat32 just for compatibility reasons between all OS's.
Another reason is data security on M$ file system (attempts) and
encrypted volumes I now use for data on mobile systems (I never mix data
and OS volumes).
All this, and much more I can get excited about, is what draws me to a
Mac, and strangely enough to Gnome, in stead of the eye candy of KDE 4.
It is the slight, tendency to the minimalistic, that is effective. Even
Win7 is catching on to the Gnome like desktop layout. I used to use KDE
3 & 4 exclusively. Now I find Mac, Gnome and Win7 are closer to one
another; I even convinced totally Windows users to use Gnome and
openSuSE 11.x. The latest was a girl friend who now got a MacBook Pro,
because it was so similar to her Ubuntu she got from me 3 years ago. As
these desktops seem to become more and more similar, I believe the most
efficient GUI will survive on the desktop - Linux will keep expanding in
the server rooms with slight Gnome Gui's (like SLES and others) or
without Gui altogether - and not the best technology. Remember the X86 -
6800 (Intel- Motorola CPU) case, the Windows - DESQview/TopView case,
and many best technologies that lost to the best marketers.
Pardon for my passionate response, but I have experienced such issues
for such a long time now. As you say, and I used to be as direct and a
little harsh as you say:
**PLEASE** don't thin(k) that a good GUI can't be a make-or-break deal.
So much in this life is about ***perceptions*** -- not facts. Most
engineers don't
get this, which is there is the stereotype of engineers being socially
clueless.
I support your plea. However, good engineers today also realise the
importance of usability of technology by non-geek users, the reason of
the success of Mac and Ubuntu the last 5 years. The persistence of the
'engineer knows what users want' mentality is perhaps the single most
important reason that M$ still exists, and that all other Linux distros
besides Ubuntu still struggle to enter the broad desktop market. I found
that after an initial use of Ubuntu for a year or so, I can successfully
update my friends' Ubuntu to the superior new openSuSE 11.X with Gnome
distro.
:-)
Al
*Original sent by / Original von / Oorspronklik van:* suse(a)tlinx.org -
Sat, 11 Jun 2011 21:09:41 -0700
> Anders Johansson wrote:
>> Out of interest (because I have no experience with Mac), could you
>> explain what Time Machine does that is different from a normal backup
>> program - not counting the 3D GUI for restoring backups, which is
>> pretty nice looking but not necessary for functionality
> ----
> Never used time machine, but your comment about a GUI not being
> necessary
> for restoring files is akin to saying there's no need for user's to
> have a 'desktop'
> on computers -- they can just use a console.
>
> Any idiot knows that's complete crap.
>
> The interface on something is what can make or break something all
> other
> things being equal. If you have a cumbersome awkward or difficult to use
> interface, it won't get used or be usable.
>
> If you have one that makes it a breeze, it opens up **new
> paradigms** in usage.
> Can you imagine doing video processing if we still had an
> interface of
> punched cards?
>
> Sure, a Video screen is nice, but punched cards would let you do
> it all.
>
> As for "3D" -- I wasn't aware the MAC supported NVIDIA's 3-D
> goggles nor
> that it's time-machine required them. Though an appearance of 3D for
> browsing files
> (a file hierarchy is usually displayed as some type of tree -- a 2D
> diagram), then having the appearance of 3 dimensions could be useful
> for browsing forward or backward in time.
>
> I have complete backups on linux using the standard 'xfsdump'
> utils and
> a modified tower of hanoi dump schedule, BUT browsing those backups,
> or pulling files out randomly, or being able to see all the versions
> of a file...that would
> be nice.
>
> I even let Windows-Backup have extra space, so it can keep copies
> of the files
> it will keep copies of (but it won't keep copies of anything on my
> linux box, as it
> is 'remote')....But for the files it does, I can see multiple copies
> in the file
> props...which is nice for single files, but unusable for backup sets.
>
> So **PLEASE** don't thing that a good GUI can't be a make-or-break
> deal.
> So much in this life is about ***perceptions*** -- not facts. Most
> engineers don't
> get this, which is there is the stereotype of engineers being socially
> clueless.
>
>
>
>> Normal backup programs are plentiful on linux though, so if you just
>> need a backup, they are available
> ----
> Not any good ones with a GUI that are also 'fast', and that backup
> all
> the ACL's, extended attrs, etc. of modern file systems.
>
> 'star' (a tar like prog) has good backup functionality (supports
> ACLS's
> XATTRS, all the 'tar' versions, compression, but it's command line
> only. xfsdump
> could be alot better if it kept full file inventories ... but backup
> progs that
> are "plentiful", that support modern file system semantics? Not my
> experience.
>
> Linda
--
To unsubscribe, e-mail: opensuse+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse+help(a)opensuse.org
13 years, 7 months
[opensuse] Disk Drive Technology and partition alignment [WAS: ]Re: 12.3 + ntfs + ext4 + USB3 + different copying speeds
by Greg Freemyer
Linda Walsh <suse(a)tlinx.org> wrote:
>Greg Freemyer wrote:
>>
>> It is time for you to enter the 21st century in respects to disk
>geometry.
>----
> Greg, stop showing your ignorance.
Ignorant of disk drive tech? Me? I'm open to learn, so let's see
where we end up.
>The LBA still corresponds to CHS *internally* -- just that the nums are
>internal
>to each HD.
>
My statement, which I stand by, is that the CHS value returned by the
drive is meaningless in modern rotating drives. Obviously drives
still have cylinders, heads, and sectors, they just don't try to
relate that geometry via the CHS info that was so important prior to
1995 or so.
Further, I state that the S value for sectors per track is not
constant for the entire drive. You say there are lots of zones. I'm
open to the idea that there are lot of values for S, depending where
on the disk you are.
Ignoring any zoning effects:
Ie. S = int( (PI * D) / L)
Where
D = diameter
L = linear length of a sector
I'm open to the idea that a disk drive would have the cylinders
grouped into zones of fixed S (sectors / track).
I state that S and RPMs drive the transfer rate, so that is why you
see different rates for different parts of the drive.
Ie.
Transfer rate = (RPMs / 60) * S * 512 / 1,000,000 = x MB/sec
Hdd drives run at a constant rpm, so the reason for the variation in
transfer rate is the variation in S from one zone to another.
So for a drive spinning at 7200 rpm and transferring 120 MB/sec for
the outer cylinders, that is about 2000 sectors/track.
>>
>> For at least the last decade the linear density of sectors is
>typically constant over the whole platter. Since you know
>circumference of a circle is PI * D, a track 3 inches from the center
>holds 3x the sectors as one 1 inch from the center. That means number
>of sectors per track isn't even a constant for a modern drive.
>----
> Wrong.
Right!
> Modern HD's have been divided into zones for the past
>15+years...
Zones == collections of cylinders with the same # of sectors/track?
If so, we both agree, but I have no idea why you said "wrong".
Anyway that means there is a fixed S (sectors/track) for each zone.
How can you know what the zones are and what the sectors per track are
for any given zone? Without that info you can't attempt to align your
partitions, so I'm still at a loss that you say partitions are aligned
to tracks in drives made since 1995 or so.
>Modern HD's have almost 1 zone/TB, but you can see a most modern
>examople at:
I guess you meant GB? If a track has 2000 sectors per the above, and
a drive has 4 heads then that's 4 MB per cylinder. Thus 1 GB is 250
cylinders.
So I guess your saying a zone has roughly 250 cylinders. I have no
feedback about that, but it seems reasonable.
>http://media.bestofmicro.com/E/N/362111/original/throughput-diagram-wd4001F…
>
>Latest 4TB HD... That isn't a smooth curve -- Each notch is a zone..
>Across
>each zone the
>number of sectors is constant.
>
>Very odd on that graph... notice as some have noted the first 50-100GB
>are slightly
>lower than just past the 100GB mark -- for READS... writes seem to be
>very smooth
>but likely due to internal disk buffering...
>
>>
>> Fyi: both modern windows and linux align to 1MB boundaries with no
>concern how that aligns with tracks.
>----
>Depends on what disk partition tool you use, but I don't know of any
>that use MB.
Hmmm...
I do computer forensics for a living. I see lots of real world
drives, but mostly windows. The first partition on most of them
starts at sector 63 or 2048. 63 is from partitioning tools that try
to align the first partition and believe the lie that the CHS data
provides. Windows xp does that.
2048 is what newer computers typically have. They no longer worry
about tracks and just align to 1 MB boundaries. Vista and win7 do
that.
Linux partitioning tools in general got updated a couple years ago to
default to MB alignment.
My favorite tool for listing partition setups is mmls (it only outputs
info since it is a reporting only tool). (Install sleuthkit it you
want to use mmls).
For my laptop, by chance in Jan I put in a brand new unformatted drive
in Jan and then did a full openSUSE 12.2 install. Nothing fancy and I
accepted the partition alignment as proposed by the installer:
> sudo mmls /dev/sda
DOS Partition Table
Offset Sector: 0
Units are in 512-byte sectors
Slot Start End Length Description
00: Meta 0000000000 0000000000 0000000001 Primary Table (#0)
01: ----- 0000000000 0000002047 0000002048 Unallocated
02: 00:00 0000002048 0004208639 0004206592 Linux Swap /
Solaris x86 (0x82)
03: 00:01 0004208640 0012595199 0008386560 Linux (0x83)
04: ----- 0012595200 0046153727 0033558528 Unallocated
05: 00:02 0046153728 0255866879 0209713152 Linux (0x83)
06: ----- 0255866880 0976773167 0720906288 Unallocated
Note that mmls shows not only the allocated partitions, but also the
unallocated space between partitions.
So the the line starting with 02: is the first partition and you can
see it starts at sector 2048. Note that 4208640 and 46153728 are also
both multiples of 2048, thus all 3 real partitions are 1 MB aligned.
Thus it is clear that whatever default openSUSE partitioner is used
during install does 1 MB alignment.
Now I happen to have a 1.5 TB external drive hooked up. What does
mmls show for it:
> sudo mmls /dev/sdb
root's password:
DOS Partition Table
Offset Sector: 0
Units are in 512-byte sectors
Slot Start End Length Description
00: Meta 0000000000 0000000000 0000000001 Primary Table (#0)
01: ----- 0000000000 0000002047 0000002048 Unallocated
02: 00:00 0000002048 2930272255 2930270208 NTFS (0x07)
03: ----- 2930272256 2930277166 0000004911 Unallocated
Now that drive was formatted by Seagate at their factory, and guess
what, they too start the first partition at 1 MB.
The rest of your email I'm going to ignore because it seems to be
about how the tools report partitions, not how they create them.
If you want me to test any particular partitioner, just ask. That 1.5
TB external is a scratch drive. I can use dd to wipe the partition
table and then use whatever tiool you want to create new partitions.
I don't know which have been updated to default to 1 MB alignment, but
I hope most have by now.
Greg
>The default display in fdisk:...sd
> Device Boot Start End Blocks Id System
>/dev/sdc1 63 25398764 12699351 83 Linux
>/dev/sdc2 25398765 42009974 8305605 83 Linux
>/dev/sdc3 * 42009975 44130554 1060290 83 Linux
>Shows POSIX standard 512 byte sectors.
>
>parted..
>Number Start End Size Type File system Flags
> 1 32.3kB 13.0GB 13.0GB primary xfs type=83
> 2 13.0GB 21.5GB 8505MB primary xfs type=83
> 3 21.5GB 22.6GB 1086MB primary xfs boot, type=83
> 4 22.6GB 146GB 123GB extended type=05
> 5 22.6GB 31.2GB 8595MB logical linux-swap(v1) type=82
> 6 31.2GB 47.3GB 16.1GB logical xfs type=83
> 7 47.3GB 58.0GB 10.7GB logical xfs type=83
> 8 59.1GB 145GB 85.9GB logical type=83
>
>Hmm....looks like kB is the lowest unit
>well...nope...
>(parted) help unit
> unit UNIT set the default unit to UNIT
>
> UNIT is one of: s, B, kB, MB, GB, TB, compact, cyl, chs, %, kiB, MiB,
> GiB, TiB
>default is 'compact'...
>
>As for my other two sd's, they both start at 17.4kB -- that's not a 1MB
>boundary
>either...
>it's actually 34 sectors -- I guess thats a gpt size --
>and boot drive is sdc... starting at the 63 sector
>Looking at the # blocks/partition and dividing by 2*1024*1024
>(sectors->MB):
>fdisk -l /dev/sdc|cut -c41-49|grep -P '^\s*[0-9]+$'|while read secs;do
>printf "%10d %s\n" "$secs" "$(pcalc "$secs/(2*1024*1024)"|grep -P '=
>\d')"
>done
> 12699351 = 6.05552244186401
> 8305605 = 3.96042108535767
> 1060290 = 0.505585670471191
> 120278655 = 57.3533320426941
> 8393931 = 4.00253820419312
> 15735636 = 7.50333595275879
> 10490413 = 5.00221872329712
> 83883366 = 39.9987058639526
>----
>
>I would say those are track aligned -- That's a 21st century 15K SAS
>drive.
>
>MB alignment?... I don't think even windows is that dumb.
>Track alignment is still an issue -- ask anyone running RAID
--
To unsubscribe, e-mail: opensuse+unsubscribe(a)opensuse.org
To contact the owner, e-mail: opensuse+owner(a)opensuse.org
11 years, 9 months